我无法从 Github 安装任何 R 包,尽管我之前已经这样做过几次。我在 R 版本 3.5.0 和 3.5.1 上都试过了。
尝试安装“https://github.com/rstudio/bookdown/bookdown-master.zip”使用:
devtools::install_github('rstudio/bookdown')
githubinstall::githubinstall("bookdown")
或正在下载并尝试在本地加载...
install_local("/Users/Brian/Documents/bookdown-master.zip")
总是给我错误信息
Error in readLines(f) :
(converted from warning) incomplete final line found on '/Users/Brian/.Rprofile'
我也尝试过其他解决方法,但所有的方法似乎都会导致此错误消息,而且我找不到任何可以告诉我它与什么相关的内容。
有什么想法吗?
最佳答案
该错误是我在使用 blogdown
包创建网站时对 .Rprofile 进行的先前编辑的结果。我不记得这样做了,但显然它会干扰包下载。
运行 file.edit(".Rprofile")
后,删除其中包含的单行,然后重新启动 R,包将再次安装。
关于r - 无法从 github 安装包 - 无法解释的错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53145856/