Amanda
Amanda

Reputation: 12747

How do I exit a function that is waiting for more input?

I screwed up a ggplot function and ran this wonky line all by itself: label = as.character(share)+'%"), -- and then I didn't realize the cursor was showing a + instead of > so I ran the whole ggplot function again and only then noticed that the console was looking for more input.

I did figure out what was wrong (I needed to close the ' and " I had opened) but I couldn't figure out how to just exit the function entirely. I tried ctrlc and every "exit" command I could think of:

+ break
+ }
+ }}}
+ end
+ return()
+ exit
+ '"'
+ 
+ '
+ "

Is there a right way to break a function that is waiting for more input in the console?

Upvotes: 0

Views: 565

Answers (1)

GuedesBF
GuedesBF

Reputation: 9858

You should try escape -- or the ESC button.

You may have to repeat it: eg. ESC ESC

Upvotes: 2

Related Questions