安装readxl包的问题

时间:2015-04-13 07:55:06

标签: r readxl

我正在尝试在Windows 64位计算机上安装新的readxl包。我尝试了以下命令进行安装

install.packages("devtools")
library(devtools)
install.packages("Rcpp")  
library(Rcpp)
install_github("hadley/readxl")

我使用install_github命令收到以下错误:

Installing github repo readxl/master from hadley
Downloading master.zip from https://github.com/hadley/readxl/archive/master.zip
Installing package from C:\Users\RAVISH~1.R\AppData\Local\Temp\RtmpUTzCUH/master.zip
Installing readxl
"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" --vanilla CMD INSTALL  \
"C:\Users\ravishankar.r\AppData\Local\Temp\RtmpUTzCUH\devtools585870ed251a\readxl-master"  \
  --library="C:/Users/ravishankar.r/Documents/R-dev" --install-tests 

* installing *source* package 'readxl' ...
** libs

*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.2/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="readxl.dll" OBJECTS="RcppExports.o XlsWorkBook.o XlsWorkSheet.o XlsxWorkBook.o XlsxWorkSheet.o benchmarks.o endian.o ole.o xls.o xlstool.o zip.o"' had status 127
ERROR: compilation failed for package 'readxl'
* removing 'C:/Users/ravishankar.r/Documents/R-dev/readxl'
Error: Command failed (1)

有人可以帮我解决这个错误吗?

1 个答案:

答案 0 :(得分:2)

安装正确版本的Rtools解决了这个问题。对于R 3.1.2,我必须安装Rtools 3.1。