Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to leave the R browser() mode in the console window?

Tags:

r

debugging

I was trying to use the browser() command to debug earlier.

Right now, I kept getting the following in the console input window:

Browse[13]> 

Is it possible to get out of this situation and just get back to the normal console window?

like image 328
user1769197 Avatar asked Oct 24 '12 15:10

user1769197


People also ask

How do I exit debug mode in R?

Q to stop debug mode, terminate the function, and return to the R prompt.

What does browser () do in R?

browser() provides the user with the possibility to inspect the elements of the function environment. y <- y * 2 performs some additional calculations with the new variable y. Note that the previous value that we have calculated in step 2) is overwritten. y returns the final y-value as output from the function.

How do I exit debug mode in Linux?

To exit debug mode, press Alt+B followed by D. at the Command Prompt to exit debug mode.


1 Answers

The help page ?browser says that typing c and hitting enter will get you out of the browser and let the function continue to run or typing Q and hitting enter will exit the browser and the function and take you back to the top-level prompt.

like image 163
Greg Snow Avatar answered Oct 13 '22 21:10

Greg Snow