r - 无法从 github 安装包 - 无法解释的错误消息

标签 r github

我无法从 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/

相关文章:

r - ggplot2:使用grid.arrange()作为do.call()的参数定义图版面

ios - Xcode 中通过 Github 提供第 3 方文件?

git - 备份 git repos,git fetch 与 git remote update

r - 矢量化模拟

github - 使用 GitHub Api 从上游合并

github - Azure Pipelines 状态徽章未显示在 Markdown 中

html - 上传到域时,我的导航栏的位置会发生变化

r - 绘制 R 数据框中所有列的分布

r - 在 R-cran 中用线条、点或类似颜色填充箱线图

r - 在 R 中绘制每天和每月的购买次数