我正在努力从Excel中的RStudio获得一些漂亮的格式化表格。 寻找解决方法时,我开始了这个主题:export excel friendly tables via HTML/CSS
希望它看起来不太粗鲁,但我想将我的问题分为两个问题。 那么这里的问题是。 我可以在没有RTools的情况下安装openxlsx的工作版本吗? 那应该是4.1.0版本。 R版本是3.3.3。
R继续安装4.0.17。 强制源安装会出现错误,并显示警告。
“警告:正在运行命令'make -f“ C:/ ..............具有状态127”
“错误:程序包'openxlsx'的编译失败”
“运行命令'” C:/ ....具有状态1“
“安装软件包'C:/ ...具有非零退出状态”
更新:
-------------------------------------------------------------------------
> install.packages("openxlsx")
There is a binary version available but the source version is later:
binary source needs_compilation
openxlsx 4.0.17 4.1.0 TRUE
Binaries will be installed
etc…
------------------------------------------------------------------------
> install.packages("openxlsx", type = "source")
trying URL 'https://cran.rstudio.com/src/contrib/openxlsx_4.1.0.tar.gz'
Content type 'application/x-gzip' length 1474393 bytes (1.4 MB)
downloaded 1.4 MB
* installing *source* package 'openxlsx' ...
** package 'openxlsx' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-33~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.3/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="openxlsx.dll" OBJECTS="RcppExports.o helper_functions.o load_workbook.o openxlsx_init.o read_workbook.o write_data.o write_file.o write_file_2.o"' had status 127
ERROR: compilation failed for package 'openxlsx'
* removing 'C:/Program Files/R/R-3.3.3/library/openxlsx'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\myname\AppData\Local\Temp\RtmpSSbC8h/downloaded_packages/openxlsx_4.1.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘openxlsx’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\myname\AppData\Local\Temp\RtmpSSbC8h\downloaded_packages’
------------------------------------------------------------------------
> install.packages("Rcpp")
There is a binary version available but the source version is later:
binary source needs_compilation
Rcpp 0.12.16 0.12.18 TRUE
Binaries will be installed
etc…
------------------------------------------------------------------------
> install.packages("Rcpp", type = "source")
trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_0.12.18.tar.gz'
Content type 'application/x-gzip' length 3809164 bytes (3.6 MB)
downloaded 3.6 MB
* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-33~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.3/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="Rcpp.dll" OBJECTS="Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o"' had status 127
ERROR: compilation failed for package 'Rcpp'
* removing 'C:/Program Files/R/R-3.3.3/library/Rcpp'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\myname\AppData\Local\Temp\RtmpuAWEno/downloaded_packages/Rcpp_0.12.18.tar.gz' had status 1
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\myname\AppData\Local\Temp\RtmpuAWEno\downloaded_packages’
------------------------------------------------------------------------
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.3.3 Rcpp_0.12.16 openxlsx_4.0.17
答案 0 :(得分:0)
没有Rtools不能从源代码安装它,但是CRAN上的当前二进制版本是4.1.0,而不是4.0.17。也许您的R版本太旧了? (RStudio版本无关紧要。当前openxlsx
要求R 3.3.0或更高版本。)