我很难从Excel中的RStudio中获得一些格式良好的表。为了寻找解决办法,我开始了以下主题:export excel friendly tables via HTML/CSS
希望这看起来不太粗鲁,但我想把我的问题分成两个问题。现在的问题是。如果没有RTools,我可以安装openxlsx的工作版本吗?那应该是4.1.0版。R版为3.3.3。
R继续安装4.0.17。强制源代码安装会产生错误,并发出警告。
更新:
-------------------------------------------------------------------------
> 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发布于 2018-07-22 11:17:58
没有Rtools,您就无法从源代码中安装它,但是CRAN上当前的二进制版本是4.1.0,而不是4.0.17。也许你的R版太老了?( RStudio版本与此无关。当前的openxlsx需要R3.3.0或更高版本。)
https://stackoverflow.com/questions/51463539
复制相似问题