简体   繁体   English

在OS X 10.8的R 2.15上安装“旧软件包”(在cran网站上不可用)

[英]Install “old package” (not available on cran web site) on R 2.15 on OS X 10.8

I'm new to R and I'm trying to install the packages that are listed on this web page: http://web.cbio.uct.ac.za/~renaud/CRAN but that are now available on cran website anymore. 我是R的新手,正在尝试安装此网页上列出的软件包: http : //web.cbio.uct.ac.za/~renaud/CRAN,但现在可以在cran网站上使用了。

When I try to use the "package installer", R is looking for an osx directory that does not exist on this web site. 当我尝试使用“软件包安装程序”时,R正在寻找该网站上不存在的osx目录。 When I download the files on my hard drive either as a .tar file or uncompress the file and then compress it as a .tgz file, I get this error message: 当我将硬盘上的文件下载为.tar文件或解压缩该文件,然后将其压缩为.tgz文件时,出现以下错误消息:

Error: file ‘/Users/XXXXXX/Downloads/NMF.tgz’ is not an OS X binary package.

Any hint on how to install this package on R, and/or what is the way to (re)compile it, so it would be recognized by R on OS X 10.8? 关于如何在R上安装此软件包和/或(重新)编译该软件包的方式的任何提示,以便R在OS X 10.8上可以识别它?

I had this problem too, and found a remedy at: http://www.highstat.com/Installing%20Library%20Packages%20that%20are%20not%20on%20the%20CRAN%20Website.pdf 我也遇到了这个问题,并在以下位置找到了补救措施: http : //www.highstat.com/Installing%20Library%20Packages%20that%20are%20not%20on%20the%20CRAN%20Website.pdf

In essence, you can de-compress the .tgz file, and (on a Mac) put the resulting directory in the following location: /Library/Frameworks/R.framework/Resources/library 本质上,您可以解压缩.tgz文件,然后(在Mac上)将生成的目录放在以下位置:/Library/Frameworks/R.framework/Resources/library

Then load the package into R using the standard library() command. 然后使用标准library()命令将程序包加载到R中。

As the referenced PDF pointed out, this approach may not work if the package includes source, but it's worth trying for you, unless you're certain it does contain source. 正如参考的PDF指出的那样,如果软件包包含源,则此方法可能不起作用,但是值得您尝试一下,除非您确定它确实包含源。

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

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