以"+"结尾在R中提示 [英] ending "+" prompt in R

查看:62
本文介绍了以"+"结尾在R中提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对R还是很陌生,在输入一些代码时输入了-o,现在我得到的不是>"提示,而是"+"提示.我似乎被某种正在寻找输入的函数所困,但是我似乎无法摆脱它.我认为必须有一种更好的方法来解决此问题,然后关闭R并重新运行我的脚本,但我无法在Google上找到任何内容(可能是因为我不知道正确的搜索词).

I'm fairly new to R and I made a type-o while entering some code and now instead of getting the ">" prompt I get a "+" prompt. I appear to be stuck in some kind of function that is looking for input, but I can't seem to get out of it. I figure that there must be a better way to fix this problem then closing R and rerunning my script but I haven't been able to find anything on google (likely because I don't know the right search terms).

感谢您的帮助,对不起,这是一个琐碎的问题

Thanks for your help, sorry it's a trivial question

我输入的代码如下:

> fit = lm(x~`y)
+ fit = lm(x~y)
+ fit
+ summary(fit)
+ 
+ 
+ end
+ ;
+ break
+ )
+ 
+ 
+ 
+ 
    
    
+ 
    
+ quit()
+ 
+ quit
+ break()
+ abline(b0hat,b1hat)
+ return(null)
+ 

推荐答案

这取决于您如何运行R.

It depends on how you’re running R.

在终端中,正常"方式是 Control + C –取消"组合键.

In the terminal, the "normal" way is Control+C – the "cancel" key combination.

在图形R应用程序和RStudio中,它是 Escape .

In the graphical R application and in RStudio, it’s Escape.

这篇关于以"+"结尾在R中提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆