Installing geoR on Ubuntu 16.04 - r

I'm having issues installing the geoR package on ubuntu 16.04, when I run
>install.packages('geoR', dependencies = TRUE)
I get the following error message
/usr/lib/R/etc/Makeconf:141: recipe for target 'RFoptions.o' failed
make: *** [RFoptions.o] Error 1
ERROR: compilation failed for package ‘RandomFieldsUtils’
* removing ‘/home/luca/R/x86_64-pc-linux-gnu-library/3.2/RandomFieldsUtils’
The downloaded source packages are in
‘/tmp/Rtmph5zmhR/downloaded_packages’
Warning message:
In install.packages("RandomFieldsUtils") :
installation of package ‘RandomFieldsUtils’ had non-zero exit status
>
> install.packages('geoR', dependencites = TRUE)
Installing package into ‘/home/luca/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘RandomFieldsUtils’, ‘RandomFields’
Error in download.file(url, destfile, method, mode = "wb", ...) :
unused argument (dependencites = TRUE)
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘RandomFieldsUtils’ failed
Error in download.file(url, destfile, method, mode = "wb", ...) :
unused argument (dependencites = TRUE)
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘RandomFields’ failed
Error in download.file(url, destfile, method, mode = "wb", ...) :
unused argument (dependencites = TRUE)
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘geoR’ failed
It seems to me that the issue is with the RandomFieldsUtils package, and also when I try to run
>install.packages('RandomFieldsUtils')
I get the same error
/usr/lib/R/etc/Makeconf:141: recipe for target 'RFoptions.o' failed
make: *** [RFoptions.o] Error 1
ERROR: compilation failed for package ‘RandomFieldsUtils’
* removing ‘/home/luca/R/x86_64-pc-linux-gnu-library/3.2/RandomFieldsUtils’
The downloaded source packages are in
‘/tmp/Rtmph5zmhR/downloaded_packages’
Warning message:
In install.packages("RandomFieldsUtils") :
installation of package ‘RandomFieldsUtils’ had non-zero exit status
I'm pretty new to R and tried this both in R Studio and in the Ubuntu console, got the same message twice.
Any idea how to fix it?
thanks in advance

After playing around a bit, I managed by downloading the second-to-latest version of RandomFieldsUtils (i.e. 0.3.16 instead of 0.3.20) directly from the contributor's website and installing it from the package.
Posting this answer to myself in case it can help anybody!

Related

Get error on installing colorspace_2.0-3 from R Studio with R.4.2.1

I have an error when I try to install colorspace (it was ok few days ago) :
install.packages("colorspace")
I have this messsage :
Warning in install.packages : downloaded length 2594858 != reported length 2627626
Warning in install.packages : URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/colorspace_2.0-3.zip': status was 'Transferred a partial file'
Error in download.file(url, destfile, method, mode = "wb", ...) : download from 'http://cran.rstudio.com/bin/windows/contrib/4.2/colorspace_2.0-3.zip' failed
Warning in install.packages : le téléchargement du package ‘colorspace’ a échoué
I have already tried the solution proposed here : 28887446
I notice I can't download the package source "colorspace_2.0-3.tar.gz" from
https://cran.r-project.org/web/packages/colorspace/index.html or from http://cran.rstudio.com/bin/windows/contrib/4.2/. I suppose this is not normal, correct ?
In addition, I can't install Rtools on my professional computer.
Thank you for your help !
Screenshot :
download_error_chrome

How should I solve error “there is no package called ‘rspatial’?

I'm trying to install rspatial package using:
if (!require("rspatial")) devtools::install_github('rspatial/rspatial')
but I received below error:
Error: Failed to install 'rspatial' from GitHub:
(converted from warning) installation of package ‘C:/Users/A02243~1/AppData/Local/Temp/Rtmpgx3SZq/file16441e95c6/rspatial_1.0-0.tar.gz’ had non-zero exit status
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘rspatial’
Also, I used:
install.packages("rspatial")
and I received below warning
Warning in install.packages :
package ‘rspatial’ is not available (for R version 3.5.2)
Is there any other ways that will install rspatial on R version 3.5.2?
Thanks.
3.5.2 has some issues with devtools - try updating processx package and see if that resolves the issue.

jsonlite for R gives error when trying to install

Where does one get jsonlite? Apparently it is missing from CRAN?
> install.packages('jsonlite')
Gives:
Installing package into ‘C:/Users/cbusch/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/jsonlite_0.9.20.zip'
Warning in install.packages :
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/jsonlite_0.9.20.zip': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/jsonlite_0.9.20.zip'
Warning in install.packages :
download of package ‘jsonlite’ failed
Any suggestions?
Like #user5249203 said:
install.packages('jsonlite', dependencies=TRUE, repos='http://cran.rstudio.com/')

Build R package on Mac for Windows

I develop a package under Mac and want to distribute it to my colleagues. I can build the package under Mac and can install it under Mac and 'most' of my colleagues Windows PCs. Some of these are Windows 7 and some are Windows 8. All of them use RStudio and different R Versions all above 3.1.
I have now one big Problem with one computer and can not figure out what to do.
When I try to install the package, I get the following message
install.packages("C:/Users/ncasasvi/Downloads/imbproteomicsr_0.1.6.tar.gz", repos = NULL, type = "source", lib="\\fs02/ncasasvi$/Dokumente/R/R-3.1.2/library")
Warning in install.packages :
'lib = "\fs02/ncasasvi$/Dokumente/R/R-3.1.2/library"' is not writable
'\\fs02\ncasasvi$\Dokumente'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
'\\fs02\ncasasvi$\DOKUME~1\R\R-31~1.2' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"//fs02/ncasasvi$/DOKUME~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "\\fs02\ncasasvi$\Dokumente\R\win-library\3.1" "C:/Users/ncasasvi/Downloads/imbproteomicsr_0.1.6.tar.gz"' had status 1
Warning in install.packages :
installation of package 'C:/Users/ncasasvi/Downloads/imbproteomicsr_0.1.6.tar.gz' had non-zero exit status
I copied now the complete package source, so all folders and files, to a Windows machine, installed Rtools and devtools there and build the package on the windows machine with the same problem...
Is there a way to geht a more precise error message, not just status one? I have no further Ideas.
I also sensed my file to win builder. It reported no error messages, but I also didn't got a 'new build package' from the website.
Hope some of you have some suggestions. Thanks in advance!
EDIT:
After changing the path to something without \\ at the beginning and trying to get rid of all the other error messages, I got this message:
> install.packages("C:/Users/ncasasvi/Downloads/imbproteomicsr_latest.tar.gz", repos = NULL, type = "source", lib=('U:/Dokumente/R/win-library/'))
Error: ERROR: no packages specified
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "U:\Dokumente\R\win-library\" "C:/Users/ncasasvi/Downloads/imbproteomicsr_latest.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/ncasasvi/Downloads/imbproteomicsr_latest.tar.gz’ had non-zero exit status
In between, I had a partly success, but it still could not install the package. This was the output in between:
> install.packages("C:/Users/ncasasvi/Downloads/imbproteomicsr_latest (2).tar.gz", repos = NULL, type = "source")
Installing package into ‘\\fs02/ncasasvi$/Dokumente/R/win-library/3.1’
(as ‘lib’ is unspecified)
'\\fs02\ncasasvi$\Dokumente'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'imbproteomicsr' ...
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
no library trees found in 'lib.loc'
Error: loading failed
Execution halted
*** arch - x64
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
no library trees found in 'lib.loc'
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing '\\fs02/ncasasvi$/Dokumente/R/win-library/3.1/imbproteomicsr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "\\fs02\ncasasvi$\Dokumente\R\win-library\3.1" "C:/Users/ncasasvi/DOWNLO~1/imbproteomicsr_latest (2).tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/ncasasvi/DOWNLO~1/imbproteomicsr_latest (2).tar.gz’ had non-zero exit status

rJava installation from local directory in windows

I installed R 2.11.1 and am running java 1.7.0
I downloaded the rJava source file rJava_0.8-8.zip from
http://cran.us.r-project.org/bin/windows/contrib/2.11/
and ran install.packages("rJava_0.8-8.zip",repos=NULL,type="source") in R from the directory containing the file. But I am getting the following lines as error:
Warning in install.packages("rJava_0.8-8.zip", repos = NULL, type = "source") :
argument 'lib' is missing: using 'C:\Users\Shiladitya\Documents/R/win64-library/2.11'
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'unpackPkgZip' not found
Warning message:
In install.packages("rJava_0.8-8.zip", repos = NULL, type = "source") :
installation of package 'rJava_0.8-8.zip' had non-zero exit status
I'm being unable to install rJava the usual way by doing
install.packages('rJava', .libPaths()[1], repos="http://cran.us.r-project.org")
since that is leading to an error message like this:
Warning: unable to access index for repository http://cran.us.r-project.org/bin/windows64/contrib/2.11
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘rJava’ is not available
Please help!

Resources