简体   繁体   English

Rstudio中的“工具中的错误::: httpdPort <= 0L:...”是什么意思?

[英]What does “Error in tools:::httpdPort <= 0L : …” in Rstudio means?

I have upgraded R to version 3.2.2. 我已将R升级到版本3.2.2。 When I restart Rstudio, before ">" is shown, there is an error message: 当我重新启动Rstudio时,在显示“>”之前,会出现一条错误消息:

Error in tools:::httpdPort <= 0L :
        comparison (4) is possible only for atomic and list types

What does this mean? 这是什么意思? What should I do to remove this message? 我该怎么做才能删除此邮件?

Upgrade your RStudio version to the latest one, should work in any OS. 将您的RStudio版本升级到最新版本,应该适用于任何操作系统。

For Linux/Ubuntu 14.04 terminal users, simply do: 对于Linux / Ubuntu 14.04终端用户,只需执行以下操作:

sudo apt-get remove rstudio

wget https://download1.rstudio.org/rstudio-0.99.489-amd64.deb

sudo dpkg -i rstudio-0.99.489-amd64.deb

Now, run RStudio. 现在,运行RStudio。 The error message should disappear. 错误消息应该消失。

I just encountered the same problem today and searched through the source code to understand the origin. 我今天刚遇到同样的问题,并通过源代码搜索了解原点。 The reason is that until R 3.1.3, httpdPort was a variable, while since R 3.2.0, it is a function. 原因是直到R 3.1.3, httpdPort是一个变量,而自R 3.2.0起,它就是一个函数。

The error occurs, because the line 发生错误,因为该行

tools:::httpdPort <= 0L

is wrong, if httpdPort is a function. 如果httpdPort是一个函数,那就错了。 It should rather be 它应该是

tools:::httpdPort() <= 0L

It seems that RStudio runs that line at some point and of course, it needs to know, which of the two versions to run. 似乎RStudio在某些时候运行该行,当然,它需要知道,运行两个版本中的哪一个。 This is why RStudio needs to be updated after R is updated from a version <= 3.1.3 to a version >= 3.2.0. 这就是在R从版本<= 3.1.3更新到版本> = 3.2.0之后需要更新RStudio的原因。

The httpdPort is defined in the file src/library/tools/R/dynamicHelp.R . httpdPort在文件src/library/tools/R/dynamicHelp.R In R version 3.1.3, the definition reads 在R 3.1.3版中,定义为

httpdPort <- 0L

while in R version 3.2.0, it is 在R版本3.2.0中,它是

httpdPort <- local({
    port <- 0L
    function(new) {
        if(!missing(new))
            port <<- new
        else
            port
    }
})

To solution to the problem is thus to either downgrade your R version to <= 3.1.3 or to upgrade RStudio. 因此,解决问题的方法是将R版本降级为<= 3.1.3 升级RStudio。

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

相关问题 尝试绘制createTreeView并获取工具中的错误::: httpdPort&gt; 0L - Trying to plot createTreeView and get the Error in tools:::httpdPort > 0L 用于布尔值的as.integer()和+ 0L有什么区别? - What's the difference between as.integer() and +0L used on booleans? dcast错误:`匹配错误(x,表,nomatch = 0L)` - dcast error: `Error in match(x, table, nomatch = 0L)` if(REML)p else 0L时出错:参数长度为零 - Error in if (REML) p else 0L : argument is of length zero 匹配错误(el,set,0L):“匹配”需要向量参数? - Error in match(el, set, 0L) : 'match' requires vector arguments? Foverlaps 错误: if (any(x[[xintervals[2L]]] - x[[xintervals[1L]]] &lt; 0L)) 中的错误停止 - Foverlaps error: Error in if (any(x[[xintervals[2L]]] - x[[xintervals[1L]]] < 0L)) stop 这个错误代码在 RStudio 中是什么意思 - what does this error code mean in RStudio 匹配错误(x,表,nomatch = 0L):“匹配”需要向量参数 - Error in match(x, table, nomatch = 0L) : 'match' requires vector arguments 修拉中的 FindVariableFeatures Function 产生“匹配错误(x,表,nomatch = 0L):'匹配'需要向量参数” - FindVariableFeatures Function in Seurat Producing “Error in match(x, table, nomatch = 0L) : 'match' requires vector arguments” 使用ggsurplot时匹配错误(x,表,不匹配= 0L - Error in match(x, table, non match =0L when using ggsurplot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM