简体   繁体   English

Rstudio在编辑脚本时将错误输出到控制台

[英]Rstudio outputs an error into the console while editing script

I am working on a project on Rstudio and something wired has become to happen: each time I write something into a script Rstudio automatically writes the following error into the console: 我正在Rstudio上的一个项目上工作,并且已经发生一些有线连接:每次我将某些内容写入脚本时,Rstudio都会自动将以下错误写入控制台:

Error in rep.int(vectorNames[i], length(vector[[i]])) : 
  unimplemented type 'NULL' in 'rep3'

and a label appears under the cursor: "R code execution error". 光标下将出现一个标签:“ R代码执行错误”。 Appart form this visual bug, everything is working properly. Appart形成了这个视觉错误,一切正常。 Does anyone have the same issue ? 有人有同样的问题吗?

I've just experienced this issue. 我刚刚遇到了这个问题。 In my case, I guess it must be related to the NAMESPACE file from the package. 就我而言,我想它必须与包中的NAMESPACE文件相关。

I can see a discussion about this subject here on R Studio support site . 我可以在R Studio支持网站上看到有关此主题的讨论。

Citation from the source mentioned above: 来自上述来源的引文:

There are two times when we run the code that could be emitting this error: 我们有两次运行代码时可能会发出此错误:

  • When attempting to retrieve completions from the package's NAMESPACE file, 尝试从软件包的NAMESPACE文件中检索补全时,
  • When attempting to retrieve completions for native routines (eg for within a '.Call()' call). 尝试检索本机例程的完成时(例如,在“ .Call()”调用中)。

Can you recall if you had been editing the package's NAMESPACE file before seeing this error? 您能记得在看到此错误之前是否曾经在编辑程序包的NAMESPACE文件吗? Alternatively, have you been using 'devtools::load_all()' or other similar machinery? 或者,您是否在使用'devtools :: load_all()'或其他类似的设备?

And to clearly answer your question: Yes! 并明确回答您的问题: 是的! I am having the same issue! 我有同样的问题! (Damn it! :) ) (该死的! :) )

LATER EDIT: 之后编辑:

I've got rid of the problem by closing the project and reopening it again. 通过关闭项目并再次重新打开它,我摆脱了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM