我试图安装 rJava
的计算机赢764位。当我运行
install.packages("rJava")
一切似乎都很好:
Installing package(s) into ‘C:/Users/djq/Documents/R/win-library/2.13’
(as ‘lib’ is unspecified)
trying URL 'http://software.rc.fas.harvard.edu/mirrors/R/bin/windows/contrib/2.13/rJava_0.9-1.zip'
Content type 'application/zip' length 654936 bytes (639 Kb)
opened URL
downloaded 639 Kb
package 'rJava' successfully unpacked and MD5 sums checked
The downloaded packages are in
C:\TEMP\RtmpW2eAUw\downloaded_packages
但是当我试图加载库 library(rJava)
时,我得到了以下错误:
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/me/Documents/R/win-library/2.13/rJava/libs/x64/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
Error: package/namespace load failed for 'rJava'
我已经安装了 JavaJRE (同时尝试32位和64位版本)和 JDK (同时使用32位和64位)。我的 R 版本是 R version 2.13.1 (2011-07-08)
,我使用的是 RStudio。
如果我尝试使用32位 R,我可以很好地加载 rJava
。难道问题只是 rJava
不运行在 R 64位?我怎么知道一个包裹是32人份而不是64人份?
编辑: 刚发布的 R.version()
:
> R.Version()
$platform
[1] "x86_64-pc-mingw32"
$arch
[1] "x86_64"
$os
[1] "mingw32"
$system
[1] "x86_64, mingw32"
$status
[1] ""
$major
[1] "2"
$minor
[1] "13.1"
$year
[1] "2011"
$month
[1] "07"
$day
[1] "08"
$`svn rev`
[1] "56322"
$language
[1] "R"
$version.string
[1] "R version 2.13.1 (2011-07-08)"