我有一个叫rpackage当地(公司)回购的包裹.我跑的install.packages("rpackage")时候告诉我:
Installing package(s) into ‘C:/Program Files/R/R-2.15.2/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘rpackage’ is not available (for R version 2.15.2)
Run Code Online (Sandbox Code Playgroud)
我已经构建了这个包R CMD INSTALL --build .,发布到本地repo并运行tools::write_PACKAGES()以更新PACKAGES文件.当我跑步时,R --version我得到:
R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i386-w64-mingw32/i386 (32-bit)
Run Code Online (Sandbox Code Playgroud)
当我跑步时,R CMD INSTALL --build --version我得到:
R add-on package installer: 2.15.2 (r61015)
Run Code Online (Sandbox Code Playgroud)
本地repo目录结构遵循官方文档,并一直工作,直到我更新到R 2.15.2.结构是: …
我刚刚下载了R和Rstudio的新Mac版本,但是当我尝试通过Rstudio界面安装ggplot2时收到以下错误消息。有替代方法吗?
> install.packages("ggplot2")
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib
Warning in install.packages :
package ‘ggplot2’ is not available (for R version 3.2.1)
Installing package into ‘/Users/tom.glaser/Library/R/3.2/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib
Warning in install.packages :
package ‘ggplot2’ is not available (for R version 3.2.1)
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/macosx/contrib/3.2
Warning message:
package ‘ggplot2’ is not available (for R version …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装一个名为“ReporteRs”的包,但它给了我这样的错误:“install.packages 中的警告:包 'ReporteRs' 不可用(对于 R 版本 3.4.4)”
我的 R 版本是 3.4.4。这是我的安装代码;
cran_dir_url <- "https://cran.r-project.org/src/contrib/Archive/ReporteRs/ReporteRs_0.8.9.tar.gz"
install.packages("ReporteRs", contriburl=cran_dir_url,
repos = cran_dir_url,
type = 'source',
INSTALL_opts = "--no-multiarch")
Run Code Online (Sandbox Code Playgroud) 我对 R 相当陌生,在安装外部软件包时遇到一些问题。我收到以下消息:
\n\npackage \xe2\x80\x98foreign\xe2\x80\x99 is not available (for R version 3.6.3) \nRun Code Online (Sandbox Code Playgroud)\n\n来自以下代码行:
\n\ninstall.packages('foreign')\nRun Code Online (Sandbox Code Playgroud)\n\n有人可以帮忙吗?谢谢!
\n如果你让我知道我应该运行什么,我可以发布更多数据,但这里是错误和版本.
> install.packages("ggplot2", dependencies = TRUE)
Warning in install.packages :
package ‘ggplot2’ is not available
Installing package(s) into ‘/home/johnny4000/R/x86_64-pc-linux-gnu-library/2.12’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘ggplot2’ is not available
Run Code Online (Sandbox Code Playgroud)
和版本
> version
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 2
minor 12.1
year 2010
month 12
day 16
svn rev 53855
language R
version.string R version 2.12.1 (2010-12-16)
Run Code Online (Sandbox Code Playgroud) 我是R.的初学者.当我下载twitterR包时,我收到了一条错误信息
将软件包安装到'/home/xxx/R/x86_64-pc-linux-gnu-library/3.1'(未指定'lib')install.packages中的警告:软件包'twitterR'不可用(对于R版本3.1. 0)
我在R中安装ggplot2软件包时遇到问题.根据R-studio,我安装了最新版本; 这是R studio首次加载时的说法:
R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
Run Code Online (Sandbox Code Playgroud)
我假设这意味着我正在使用正确的版本.但是,当我尝试使用install.packages("ggplot2")命令安装ggplot2包时,我收到以下错误(必须在pastebin中发布,因为它包含链接):
It appears to be some kind of error with my internet connection (not sure how to fix it, googling didn't seem to give a concrete answer). After I got that error, I went ahead and just tried downloading the .zip file for ggplot2 from the official CRAN website. Then, in R-Studio I went ahead …
我正在尝试准备一个要提交给 CRAN 的包。在我的描述文件中,我在 Depends 和 Suggests 参数中包含了非 CRAN 包。为了告诉 R 在哪里可以找到非 CRAN 包,我包含了 Additional_repositories 参数;并且我在程序的顶部(即在“zzz.R”中)包含了一个 .onLoad 函数。只要所有 Depends 和 Suggests 包都存在,我就能够在 RStudio 中构建和检查 (--as-cran) 零警告、注释或错误。然后我使用 devtools::build() 在本地创建一个 .tar.gz 文件。
为了测试本地安装是否成功,我从我的计算机中删除了非 CRAN 包并尝试安装我创建的 .tar.gz 文件。然后我收到消息:
ERROR: dependency 'smwrQW' is not available for package 'baytrends'
Run Code Online (Sandbox Code Playgroud)
我已经阅读了
不幸的是,上述错误仍在继续。我对我使用的 url 充满信心,因为下面的 install.package 行在独立运行时有效
install.packages('smwrQW',repos=c("http://owi.usgs.gov/R"),dependencies = TRUE)
Run Code Online (Sandbox Code Playgroud)
描述和 zzz.R 文件的适用位如下:
描述:
Date: 2017-03-15
Depends:
R …Run Code Online (Sandbox Code Playgroud)