Problem installing LambertW package for R - r

I'm trying to install the LambertW package for R (or any package that will give me the Lambert W function). Everytime I try:
install.packages("LambertW")
I get this output...
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error in read_r_config(sprintf("%sFLAGS", cxx), envir = NULL)[[1]] :
subscript out of bounds
Calls: source_file -> eval -> eval
Execution halted
ERROR: configuration failed for package ‘RcppParallel’
* removing ‘/usr/local/lib/R/3.6/site-library/RcppParallel’
Warning in install.packages :
installation of package ‘RcppParallel’ had non-zero exit status
ERROR: dependency ‘RcppParallel’ is not available for package ‘lamW’
* removing ‘/usr/local/lib/R/3.6/site-library/lamW’
Warning in install.packages :
installation of package ‘lamW’ had non-zero exit status
ERROR: dependency ‘lamW’ is not available for package ‘LambertW’
* removing ‘/usr/local/lib/R/3.6/site-library/LambertW’
Warning in install.packages :
installation of package ‘LambertW’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/4m/qkbb2hwd1t12v_11mjcphv300000gn/T/RtmpcUm3LQ/downloaded_packages’
Then if I try to load it using library I get this
library("LambertW")
Error in library("LambertW") : there is no package called ‘LambertW’
Does anyone know how to solve this?

Related

How can I install rayshader on an AWS machine?

I have been trying to solve this problem for a few hours but I can't find any way to do it. The command that I have used is: install.packages("rayshader")
I have tried to install the 'rayshader' package on an AWS machine with an EC2 instance. The intention of this installation is to be able to run a make command for the auto creation of a RMD report containing 3D graphics from 'rayshader'.
The errors returned by the execution are as follows:
make: *** [RcppArmadillo.so] Error 1
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.4/RcppArmadillo’
ERROR: dependencies ‘jpeg’, ‘RcppArmadillo’ are not available for package ‘rayimage’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.4/rayimage’
ERROR: dependencies ‘raster’, ‘rayimage’, ‘RcppArmadillo’ are not available for package ‘rayshader’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.4/rayshader’
The downloaded source packages are in
‘/tmp/RtmpDWE73c/downloaded_packages’
Warning messages:
1: In install.packages("rayshader") :
installation of package ‘jpeg’ had non-zero exit status
2: In install.packages("rayshader") :
installation of package ‘RcppArmadillo’ had non-zero exit status
3: In install.packages("rayshader") :
installation of package ‘rayimage’ had non-zero exit status
4: In install.packages("rayshader") :
installation of package ‘rayshader’ had non-zero exit status
Please, any help would be greatly appreciated!

Impossible to use R

Im having trouble to install any package after downloading the last R update. The errors always look like this:
ERROR: dependencies ‘ellipsis’, ‘glue’, ‘vctrs’ are not available for package ‘tidyselect’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tidyselect’
Warning in install.packages :
installation of package ‘tidyselect’ had non-zero exit status
Also it appears an error such as this:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘backports’
Anyone has any idea how i can change this?

Install R package 'rgdal' and its external dependencies offline on windows

My work laptop has no internet access and I am trying to download the package rgdal.
I have downloaded rgdal_1.4-8.tar.gz, gdal-3.0.4.tar.gz and proj-6.3.2.tar.gz. I tried intalling them via source separately using:
install.packages('.../...tar.gz', type='source', repos=NULL)
but it did not work. Here are the error messages
ERROR: cannot extract package from 'D:/Users/sn/Documents/R source packages/gdal-3.0.4.tar.gz'
Warning in install.packages :
installation of package ‘D:/Users/sn/Documents/R source packages/gdal-3.0.4.tar.gz’ had non-zero exit status
ERROR: cannot extract package from 'D:/Users/sn/Documents/R source packages/proj-6.3.2.tar.gz'
Warning in install.packages :
installation of package ‘D:/Users/sn/Documents/R source packages/proj-6.3.2.tar.gz’ had non-zero exit status
Error in download.file(sprintf("https://github.com/rwinlib/gdal2/archive/v%s.zip", :
cannot open URL 'https://github.com/rwinlib/gdal2/archive/v2.2.3.zip'
In addition: Warning message:
In download.file(sprintf("https://github.com/rwinlib/gdal2/archive/v%s.zip", :
InternetOpenUrl failed: 'A connection with the server could not be established'
Execution halted
make: *** [Makevars.win:27: winlibs] Error 1
ERROR: compilation failed for package 'rgdal'
* removing 'D:/Users/sn/Documents/R/win-library/3.6/rgdal'
Warning in install.packages :
installation of package ‘D:/Users/sn/Documents/R source packages/rgdal_1.4-8.tar.gz’ had non-zero exit status

Error: installation of package ‘ranger’ had non-zero exit status

I am experiencing great difficulties in installing the package ranger. Here is the error message that I am getting:
ERROR: compilation failed for package ‘ranger’
* removing ‘/home/ibraim/R/x86_64-pc-linux-gnu-library/3.5/ranger’
Warning in install.packages :
installation of package ‘ranger’ had non-zero exit status
I also tried the installation by using devtools, which did not work. Do you have any suggestion how to solve this problem?

tsoutliers dependency issue: dependency KFKSDS has non-zero exit status?

While working on outlier detection on a time series data. I came across [tsoutliers][1] packages that does implement Chen and Liu's time series outlier detection. But I am unable to install tsoutliers in R
install.packages("tsoutliers")
I am getting the following dependency errors
In file included from KF-deriv.cpp:1:0: KFKSDS.h:14:28: fatal error:
gsl/gsl_vector.h: No such file or directory compilation terminated.
/usr/lib/R/etc/Makeconf:143: recipe for target 'KF-deriv.o' failed
make: *** [KF-deriv.o] Error 1 ERROR: compilation failed for package
‘KFKSDS’
* removing ‘/home/atoffy/R/x86_64-pc-linux-gnu-library/3.2/KFKSDS’ Warning in install.packages : installation of package ‘KFKSDS’ had
non-zero exit status ERROR: dependency ‘KFKSDS’ is not available for
package ‘stsm’
* removing ‘/home/atoffy/R/x86_64-pc-linux-gnu-library/3.2/stsm’ Warning in install.packages : installation of package ‘stsm’ had
non-zero exit status ERROR: dependencies ‘stsm’, ‘KFKSDS’ are not
available for package ‘tsoutliers’
* removing ‘/home/atoffy/R/x86_64-pc-linux-gnu-library/3.2/tsoutliers’ Warning in install.packages : installation of package ‘tsoutliers’
had non-zero exit status
More specifically
recipe for target 'KF-deriv.o' failed
Can anyone help me to install the same?
I was able to solve the same by installing
libgsl0
sudo apt-get install libgsl0-dev

Resources