用R中的开发版本替换已安装的软件包

时间:2013-05-01 12:57:53

标签: r

当我已安装软件包时,我正在拼凑如何安装软件包的开发版本的说明,但我有点困惑。我的具体需求是安装lme4的开发版本,以便我可以使用predict函数。

首先,我知道我应该找到lme4的开发版本,我已经找到了(在一般意义上)at this URL。我正在运行Mac OSX 10.6.8(Snow Leopard)和R版本2.14.1,因此我导航到正确的文件夹并下载*.tgz文件。但是当我尝试使用以下命令安装软件包时:

install.packages("~/Downloads/lme4_0.99999911-2.tgz", repos = NULL)

我收到错误消息说明:

Warning in install.packages :
  package ‘~/Downloads/lme4_0.99999911-2.tgz’ is not available (for R version 2.14.1)

(1)如何查看需要运行哪个版本的RI才能访问软件包的开发版本,以及(2)如何更新我的R版本和/或替换已存在的版本版本lme4

更新

我尝试了另一种使用命令的方法:

> library("devtools")
> install_github("lme4",user="lme4")

不幸的是,这会产生输出..

Installing github repo(s) lme4/master from lme4
Installing lme4.zip from https://github.com/lme4/lme4/zipball
Installing lme4
Installing dependencies for lme4:
RcppEigen, minqa, RcppEigen
Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library’
(as ‘lib’ is unspecified)
trying URL 'http://lib.stat.cmu.edu/R/CRAN/bin/macosx/leopard/contrib/2.14/minqa_1.2.1.tgz'
Content type 'application/x-gzip' length 945252 bytes (923 Kb)
opened URL
==================================================
downloaded 923 Kb


The downloaded packages are in
    /var/folders/IZ/IZlpzJbtHEq7NQxUHPvExk+++TI/-Tmp-//Rtmpt8YCsF/downloaded_packages
* checking for file '/private/var/folders/IZ/IZlpzJbtHEq7NQxUHPvExk+++TI/-Tmp-/Rtmpt8YCsF/lme4-lme4-7a6f816/DESCRIPTION' ... OK
* preparing 'lme4':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'lme4_0.99999911-2.tar.gz'

ERROR: dependency 'RcppEigen' is not available for package 'lme4'
* removing '/Library/Frameworks/R.framework/Versions/2.14/Resources/library/lme4'
Error: Command failed (1)
In addition: Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘RcppEigen’ is not available (for R version 2.14.1)
> install.packages("~/Downloads/RcppEigen_0.3.1.2.1.tgz", repos = NULL)

谢谢!希望我的问题对其他R新手有用... 更新2

根据上面的输出,我已升级到R 3.0.0。但是,现在当我尝试安装我下载的软件包时出现以下错误:

> install.packages("~/Downloads/lme4_0.99999911-2.tgz", repos = NULL)

Warning in install.packages :
  package ‘~/Downloads/lme4_0.99999911-2.tgz’ is not available (for R version 3.0.0)
Installing package into ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library’
(as ‘lib’ is unspecified)
'.path.package' is deprecated.
Use 'path.package' instead.
See help("Deprecated")

0 个答案:

没有答案