> install.packages("sf")
Installing package into ‘C:/Users/koyeli.majumder/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘units’
There are binary versions available but the source versions are later:
binary source needs_compilation
units 0.5-1 0.6-0 FALSE
sf 0.6-1 0.6-3 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sf_0.6-1.zip'
Content type 'application/zip' length 39296219 bytes (37.5 MB)
downloaded 37.5 MB
package ‘sf’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\koyeli.majumder\AppData\Local\Temp\Rtmp6LwTYc\downloaded_packages
installing the source package ‘units’
trying URL 'https://cran.rstudio.com/src/contrib/units_0.6-0.tar.gz'
Content type 'application/x-gzip' length 912393 bytes (891 KB)
downloaded 891 KB
* installing *source* package 'units' ...
** package 'units' successfully unpacked and MD5 sums checked
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
Warning: running command 'make -f "Makevars.win" -f "D:/RStudio/R-3.3.3/etc/x64/Makeconf" -f "D:/RStudio/R-3.3.3/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="units.dll" WIN=64 TCLBIN=64 OBJECTS="RcppExports.o io.o udunits.o"' had status 127
ERROR: compilation failed for package 'units'
* removing 'C:/Users/koyeli.majumder/Documents/R/win-library/3.3/units'
Warning in install.packages :
running command '"D:/RStudio/R-3.3.3/bin/x64/R" CMD INSTALL -l "C:\Users\koyeli.majumder\Documents\R\win-library\3.3" C:\Users\KOYELI~1.MAJ\AppData\Local\Temp\Rtmp6LwTYc/downloaded_packages/units_0.6-0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘units’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\koyeli.majumder\AppData\Local\Temp\Rtmp6LwTYc\downloaded_packages’
> library(sf)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘units’
Error: package or namespace load failed for ‘sf’
起初我也无法安装,但是在卸载rgdal软件包后,我可以安装sf软件包。但是我无法加载它。结果出现以下错误。
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘units’
Error: package or namespace load failed for ‘sf’
我也无法分别加载包装单元。我有Windows 7 64位系统。
答案 0 :(得分:0)
答案发给@Ralf Stubner。
您安装了units
依赖性软件包的最新版本。要将源编译为二进制文件,您需要安装Rtools
软件包。
作为替代方案,您可以使用带有参数install.packages
的{{1}}函数来安装较早的可用二进制软件包。
type = "binary"