When running R-3.4.4 (on Windows 7, RStudio):
install.packages("ggplot2", destdir = "C:/Program Files/R/R-3.4.4/library/temp")
I get the following warning (presumably from the space in the path):
installing the source package ‘ggplot2’
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.2.1.tar.gz'
Content type 'application/x-gzip' length 3204655 bytes (3.1 MB)
downloaded 3.1 MB
Warning: invalid package 'C:/Program'
Warning: invalid package 'Files/R/R-3.4.4/library/temp/ggplot2_3.2.1.tar.gz'
Error: ERROR: no packages specified
In R CMD INSTALL
Warning in install.packages :
running command '"C:/Program Files/R/R-3.4.4/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.4.4\library" C:/Program Files/R/R-3.4.4/library/temp/ggplot2_3.2.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
Although, trying to circumvent it using:
install.packages("ggplot2", destdir = "C:/Temp")
leads to:
* installing *source* package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'pillar'
where
.libPaths()
[1] "C:/Program Files/R/R-3.4.4/library"
Again, trying to solve that warning with:
install.packages("pillar", destdir = "C:/Temp")
leads to
** testing if installed package can be loaded
Fatal error: cannot open file 'C:\Users\Mary': No such file or directory
The full path is C:\Users\Mary Surname\etc\etc... Which brings it back to the first problem where there is a space between "FirstName" and "Surname" in the path.
Any way to correct the incorrect interpretation of the space. Note, the download is fine but it falls over trying to find the zip file it had only just downloaded.
Related
I am using RStudio Version 1.0.136 – © 2009-2016 RStudio, Inc. I checked for a new update and I received a massege that saying "You're using the newest version of RStudio".
Here I am trying to use R ‘intsvy’ package.
I started by setting up the directory.
Then, first I installed the package by using the following code:
install.packages("intsvy", lib="/Library/Frameworks/R.framework/Versions/3.3/Resources/library")
Below is the Console results
There is a binary version available but the source version is later:
binary source needs_compilation
intsvy 2.1 2.4 FALSE
installing the source package ‘intsvy’
trying URL 'https://cran.rstudio.com/src/contrib/intsvy_2.4.tar.gz'
Content type 'application/x-gzip' length 56777 bytes (55 KB)
==================================================
downloaded 55 KB
starting R..
* installing *source* package ‘intsvy’ ...
** package ‘intsvy’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘repr’
ERROR: lazy loading failed for package ‘intsvy’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/intsvy’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/intsvy’
Warning in install.packages :
installation of package ‘intsvy’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/jj/3brk8hp91ps2mdv6gzlynh6r0000gn/T/RtmppVfRws/downloaded_packages’
Second, I installed the package by using the following code after receiving the above long massage:
install.packages("intsvy")
Below is the Console results
Installing package into ‘/Users/HU-Hisham/Library/R/3.3/library’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
intsvy 2.1 2.4 FALSE
installing the source package ‘intsvy’
trying URL 'https://cran.rstudio.com/src/contrib/intsvy_2.4.tar.gz'
Content type 'application/x-gzip' length 56777 bytes (55 KB)
==================================================
downloaded 55 KB
starting R..
* installing *source* package ‘intsvy’ ...
** package ‘intsvy’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘repr’
ERROR: lazy loading failed for package ‘intsvy’
* removing ‘/Users/HU-Hisham/Library/R/3.3/library/intsvy’
Warning in install.packages :
installation of package ‘intsvy’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/jj/3brk8hp91ps2mdv6gzlynh6r0000gn/T/RtmppVfRws/downloaded_packages’
Next #load backage
library("intsvy")
Below are the massages I received in the Console
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘repr’
In addition: Warning message:
package ‘intsvy’ was built under R version 3.3.2
Error: package or namespace load failed for ‘intsvy’
After installations, I tried to run the following command
pirls.var.label(folder = getwd("~/Desktop/Dr. Kato/Data/PISA/CY07_MSU_STU_QQQ.sav"),
+ name = "Variable labels", output = getwd())
Here is the massage
Error: could not find function "pirls.var.label"
Function pirls.var.label is one of the functions in the 'intsvy' package.
Why am I receiving this error? Is it because the package not successfully installed? How can I take care or this matter and start using the package and data? Please advice.
I updated my R version from R3.3.1 (2016-06-21) to R3.6.2 (2019-12-12)as some experts recommended.
Then I run the commands again after restarting R:
1 installing repr package
> install.packages("repr")
Warning in install.packages :
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES.rds': HTTP status was '404 Not Found'
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/repr_1.0.2.tgz'
Content type 'application/x-gzip' length 118906 bytes (116 KB)
==================================================
downloaded 116 KB
The downloaded binary packages are in
/var/folders/jj/3brk8hp91ps2mdv6gzlynh6r0000gn/T//Rtmpt0mup2/downloaded_packages
Warning message:
R graphics engine version 12 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.
2 installing intsvy package
> install.packages("intsvy", dependencies = T)
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/intsvy_2.4.tgz'
Content type 'application/x-gzip' length 336356 bytes (328 KB)
==================================================
downloaded 328 KB
The downloaded binary packages are in
/var/folders/jj/3brk8hp91ps2mdv6gzlynh6r0000gn/T//Rtmpt0mup2/downloaded_packages
load backage
> library("intsvy")
Error: package or namespace load failed for ‘intsvy’:
.onLoad failed in loadNamespace() for 'pillar', details:
call: utils::packageVersion("vctrs")
error: there is no package called ‘vctrs’
> library(intsvy)
Error: package or namespace load failed for ‘intsvy’:
.onLoad failed in loadNamespace() for 'pillar', details:
call: utils::packageVersion("vctrs")
error: there is no package called ‘vctrs’
Still same errors when I try to run the package commands
> pisa.var.lable(folder="~/Desktop/Dr. Kato/Data/PISA/CY07_MSU_STU_QQQ.sav")
Error in pisa.var.lable(folder = "~/Desktop/Dr. Kato/Data/PISA/CY07_MSU_STU_QQQ.sav") :
could not find function "pisa.var.lable"
> pirls.var.label(folder = getwd("~/Desktop/Dr. Kato/Data/PISA/CY07_MSU_STU_QQQ.sav"),
+ name = "Variable labels", output = getwd())
Error in pirls.var.label(folder = getwd("~/Desktop/Dr. Kato/Data/PISA/CY07_MSU_STU_QQQ.sav"), :
could not find function "pirls.var.label"
If you have an idea, please share it here so I can try it to solve this issue and start using the package and PISA data.
Thank you
> 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’
At first I was unable to install also but after I uninstalled rgdal package, I could install sf package. But I'm unable to load it. Results in below error.
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’
I'm unable to load package units also separately. I have a Windows 7 64 bit system.
Answer goes out to #Ralf Stubner.
You install units dependency package latest version. To compile sources into binaries you need to have installed Rtools package.
As an alternative you can use install.packages function with argument type = "binary" to install the older available binary package.
install.packages("units", type = "binary")
Here I attempt to download an earlier version of 'backports' to deal with the issue. Any ideas where to look or how to approach this issue?
> library(devtools)
Warning message:
package ‘devtools’ was built under R version 3.2.5
> install_version("backports",version="1.1.0")
Trying https://cran.rstudio.com/
Trying http://www.stats.ox.ac.uk/pub/RWin
Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/backports/backports_1.1.0.tar.gz
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached
> install.packages("rmarkdown")
Installing package into ‘H:/R/win-library/3.2’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
rmarkdown 1.4 1.8 FALSE
installing the source package ‘rmarkdown’
trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_1.8.tar.gz'
Content type 'application/x-gzip' length 2093181 bytes (2.0 MB)
downloaded 2.0 MB
* installing *source* package 'rmarkdown' ...
** package 'rmarkdown' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'backports'
ERROR: lazy loading failed for package 'rmarkdown'
* removing 'H:/R/win-library/3.2/rmarkdown'
* restoring previous 'H:/R/win-library/3.2/rmarkdown'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l
"H:\R\win-library\3.2" C:\Users\jacarter\AppData\Local\Temp\3\RtmpULt4Do/downloaded_packages/rmarkdown_1.8.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\jacarter\AppData\Local\Temp\3\RtmpULt4Do\downloaded_packages’
I have this error when trying to run install.packages("rmarkdown"). Can someone please let me know what's wrong?
installing source package 'rmarkdown' ...
** package 'rmarkdown' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no
package called 'backports' ERROR: lazy loading failed for package
'rmarkdown'
removing 'C:/Program Files/R/R-3.2.3/library/rmarkdown'
restoring previous 'C:/Program Files/R/R-3.2.3/library/rmarkdown' Warning in install.packages : running command
'"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" CMD INSTALL -l "C:\Program
Files\R\R-3.2.3\library"
C:\Users\knguyen\AppData\Local\Temp\Rtmp0KyOP9/downloaded_packages/rmarkdown_1.6.tar.gz'
had status 1 Warning in install.packages : installation of package
‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\knguyen\AppData\Local\Temp\Rtmp0KyOP9\downloaded_packages’
Blockquote
Try install the package backports as mentioned in the error.
Try installing the new R Version https://cran.r-project.org/bin/windows/base/old/3.4.3/.
I tried installing R markdown in my R studio, but it keeps looping to ask me to install the package. The R version on my R studio was version 1.1, and after I installed the new R Version, installing the R Markdown package was a success. Hopefully this could help.
Hi hereunder a problem when I try to install h2oEnsemble. I don't know to fix this. PLease help.
My goal here is to run this exemple:
https://github.com/h2oai/h2o-world-2015-training/blob/master/tutorials/ensembles-stacking/ensembles-stacking.R
> library(devtools)
Warning message:
le package ‘devtools’ a été compilé avec la version R 3.1.3
> install_github("h2oai/h2o-3/h2o-r/ensemble/h2oEnsemble-package")
Downloading GitHub repo h2oai/h2o-3#master
Error in loadNamespace(name) : there is no package called ‘RCurl’
> install.packages("RCurl")
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/RCurl_1.95-4.7.zip'
Content type 'application/zip' length 2858866 bytes (2.7 Mb)
opened URL
downloaded 2.7 Mb
Warning in install.packages :
downloaded length 2858866 != reported length 2858866
package ‘RCurl’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Djilo\AppData\Local\Temp\RStudioPortableTemp\RtmpmQLJyE\downloaded_packages
> install_github("h2oai/h2o-3/h2o-r/ensemble/h2oEnsemble-package")
Downloading GitHub repo h2oai/h2o-3#master
Installing h2oEnsemble
Installing 1 packages: RCurl
package ‘RCurl’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘RCurl’
"E:/DATAMI~3/R-PORT~1/App/R-PORT~1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/Djilo/AppData/Local/Temp/RStudioPortableTemp/RtmpmQLJyE/devtools177417c33da9/h2oai-h2o-3-7eaa37a/h2o-r/ensemble/h2oEnsemble-package" --library="E:/Data \
Mining - R/R-Portable/App/R-Portable/library" --install-tests
installing source package 'h2oEnsemble' ...
** R
** tests
** preparing package for lazy loading
Avis : package 'statmod' was built under R version 3.1.3
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'RCurl'
Error : package 'h2o' could not be loaded
ERROR: lazy loading failed for package 'h2oEnsemble'
removing 'E:/Data Mining - R/R-Portable/App/R-Portable/library/h2oEnsemble'
Error: Command failed (1)
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
downloaded length 2858866 != reported length 2858866
This question was resolved when the user successfully upgraded their H2O installation. If you don't kill your currently running H2O instance before upgrading, the upgrade may fail.