1

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

首先,我知道我应该找到 的开发版本lme4,我已经(在一般意义上)在这个 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")
4

0 回答 0