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

北慕城南 提交于 2021-02-11 12:58:13

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!