我正在尝试从github加载lme4的开发版本,到目前为止还没有成功。我希望我能够引导我朝着正确的方向前进。请耐心等待,因为我不熟悉编码。
我在使用osX 10.9的Mac上使用R ++ 3.0.2版的Rstudio(版本0.98.49)。我使用调用$ xcode-select --install在终端中安装了命令行工具。我还下载了MacTeX(虽然我不确定这是否必要)。我收到命令失败的错误,并且因为如何成功加载它而感到茫然。请参阅下面的代码。
>library(devtools)
> install_github("lme4",user="lme4",ref="release")
Installing github repo lme4/release from lme4
Downloading lme4.zip from https://github.com/lme4/lme4/archive/release.zip
Installing package from /var/folders/c1/m61j43qn3fs5xc43kg7s8jmh0000gn/T//Rtmp9PBWcN/lme4.zip
arguments 'minimized' and 'invisible' are for Windows only
Installing lme4
'/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD build \
'/private/var/folders/c1/m61j43qn3fs5xc43kg7s8jmh0000gn/T/Rtmp9PBWcN/devtoolsb8344e5f03d/lme4-release' \
--no-manual --no-resave-data
* checking for file '/private/var/folders/c1/m61j43qn3fs5xc43kg7s8jmh0000gn/T/Rtmp9PBWcN/devtoolsb8344e5f03d/lme4-release/DESCRIPTION' ... OK
* preparing 'lme4':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to build vignettes
-----------------------------------
* installing *source* package 'lme4' ...
** libs
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppEigen/include" -DNDEBUG -DEIGEN_DONT_VECTORIZE -fPIC -mtune=core2 -g -O2 -c external.cpp -o external.o
external.cpp:340:18: warning: | has lower precedence than >; > will be evaluated first [-Wparentheses]
(isNAN(pdev) | pdev > oldpdev); k++) {
^~~~~~~~~~~~~~~~
external.cpp:340:18: note: place parentheses around the '>' expression to silence this warning
(isNAN(pdev) | pdev > oldpdev); k++) {
^
( )
external.cpp:340:18: note: place parentheses around the | expression to evaluate it first
(isNAN(pdev) | pdev > oldpdev); k++) {
~~~~~~~~~~~~^~~~~~
external.cpp:359:19: warning: | has lower precedence than >; > will be evaluated first [-Wparentheses]
if (isNAN(pdev) | (pdev - oldpdev) > tol)
^~~~~~~~~~~~~~~~~~~~~~~~
external.cpp:359:19: note: place parentheses around the '>' expression to silence this warning
if (isNAN(pdev) | (pdev - oldpdev) > tol)
^
( )
external.cpp:359:19: note: place parentheses around the | expression to evaluate it first
if (isNAN(pdev) | (pdev - oldpdev) > tol)
~~~~~~~~~~~~^~~
2 warnings generated.
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppEigen/include" -DNDEBUG -DEIGEN_DONT_VECTORIZE -fPIC -mtune=core2 -g -O2 -c glmFamily.cpp -o glmFamily.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppEigen/include" -DNDEBUG -DEIGEN_DONT_VECTORIZE -fPIC -mtune=core2 -g -O2 -c mcmcsamp.cpp -o mcmcsamp.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppEigen/include" -DNDEBUG -DEIGEN_DONT_VECTORIZE -fPIC -mtune=core2 -g -O2 -c optimizer.cpp -o optimizer.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppEigen/include" -DNDEBUG -DEIGEN_DONT_VECTORIZE -fPIC -mtune=core2 -g -O2 -c predModule.cpp -o predModule.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppEigen/include" -DNDEBUG -DEIGEN_DONT_VECTORIZE -fPIC -mtune=core2 -g -O2 -c respModule.cpp -o respModule.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o lme4.so external.o glmFamily.o mcmcsamp.o optimizer.o predModule.o respModule.o /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/lib/libRcpp.a -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /private/var/folders/c1/m61j43qn3fs5xc43kg7s8jmh0000gn/T/RtmppWXl9s/Rinstd496922c9c0/lme4/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
'PLSvGLS.Rnw'
'Theory.Rnw'
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/private/var/folders/c1/m61j43qn3fs5xc43kg7s8jmh0000gn/T/RtmppWXl9s/Rinstd496922c9c0/lme4/libs/lme4.so':
dlopen(/private/var/folders/c1/m61j43qn3fs5xc43kg7s8jmh0000gn/T/RtmppWXl9s/Rinstd496922c9c0/lme4/libs/lme4.so, 6): Symbol not found: __ZN4Rcpp11EnvironmentixERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
Referenced from: /private/var/folders/c1/m61j43qn3fs5xc43kg7s8jmh0000gn/T/RtmppWXl9s/Rinstd496922c9c0/lme4/libs/lme4.so
Expected in: flat namespace
in /private/var/folders/c1/m61j43qn3fs5xc43kg7s8jmh0000gn/T/RtmppWXl9s/Rinstd496922c9c0/lme4/libs/lme4.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/private/var/folders/c1/m61j43qn3fs5xc43kg7s8jmh0000gn/T/RtmppWXl9s/Rinstd496922c9c0/lme4'
-----------------------------------
ERROR: package installation failed
Error: Command failed (1)
我确信我遗漏了一些显而易见的东西,但在我继续学习的过程中,我感谢任何帮助。谢谢!