问题
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?
回答1:
You should try escape -- or the ESC button.
You may have to repeat it: eg. ESC ESC
来源:https://stackoverflow.com/questions/63318669/how-do-i-exit-a-function-that-is-waiting-for-more-input