Closed machaielder closed 5 years ago
African monthly images are not provided in NetCDF format, see #2. Using format = "tifs"
should solve your issue:
chirps_africa <- getCHIRPS(region = "africa", format = "tifs"
, tres = "monthly", sres = 0.05
, dsn = file.path(getwd(), "data"), cores = 2)
Thank you very much for your help. However, it still gives the same error message. Error in serverPath() : could not find function "serverPath" Thank you.
Hm, I fail to reproduce the described behavior. Can you please provide your sessionInfo()
?
Thank you again, here You are! R version 3.5.2 (2018-12-20) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1] compiler_3.5.2 parallel_3.5.2 tools_3.5.2 yaml_2.2.0
Thanks. Can you please load heavyRain and create the sessionInfo()
afterwards? In addition, what happens if you run heavyRain:::serverPath()
in the console?
Thank You! I get the following error message: Error in loadNamespace(name) : there is no package called ‘heavyRain’
Does this error have anything to do with the fact that I downloaded the heaveyReain manually to run in Rstudio? Thank You in advance.
That might well be. Could you please do the following
remotes::install_github("environmentalinformatics-marburg/heavyRain")
and test with this version again in order to verify that?
It did not work again. I had tried it before and got error
devtools::install_github("environmentalinformatics-marburg/heavyRain") Downloading GitHub repo environmentalinformatics-marburg/heavyRain@master Error in utils::download.file(url, path, method = download_method(), quiet = quiet, : cannot open URL 'https://api.github.com/repos/environmentalinformatics-marburg/heavyRain/tarball/master'
Can you download the tarball (simply click the link above) and install the package from the .tar.gz file manually? If not, I fear there might be something wrong with your internet connection (firewall/VPN issue, etc.).
I downloaded it manually and run. I got the same error message. Error in serverPath() : could not find function "serverPath"
Again, please include your sessionInfo()
created right after running library(heavyRain)
. In addition, does heavyRain:::serverPath()
still fail?
library(heavyRain) Error in library(heavyRain) : there is no package called ‘heavyRain’
You have to find a way to install the package first. This is no issue related to the package, but rather to your software/network setup, which is why I am closing this thread now.
Try to install the package either using remotes::install_github()
or from a local resource (ie. a .tar.gz file). Afterwards, you'll be able to run library(heavyRain)
and use its functionality.
@machaielder you can try this solution using devtools::install_local('path/to/your/downloaded/heavyRain-master.zip')
Thank you very much. The error stills remains. I can't figure out whats happening. llibrary("devtools")
devtools::install_local('heavyRain-master.zip') Skipping 6 packages not available: gdalUtils, gimms, ncdf4, R.utils, raster, RCurl Installing 6 packages: gdalUtils, gimms, ncdf4, R.utils, raster, RCurl Installing packages into ‘C:/Users/Elder/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) Error: (converted from warning) unable to access index for repository https://cran.rstudio.com/src/contrib: cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
I think you first need to install.packages(c("gdalUtils", "gimms", "ncdf4", "R.utils", "raster", "RCurl"))
and then run devtools::install_local('heavyRain-master.zip')
I did not install. Does it have to do with rhe r version?
install.packages(c("gdalUtils", "gimms", "ncdf4", "R.utils", "raster", "RCurl")) Warning in install.packages : unable to access index for repository https://cran.rstudio.com/src/contrib: cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES' Installing packages into ‘C:/Users/Elder/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) Warning in install.packages : unable to access index for repository https://cran.rstudio.com/src/contrib: cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES' Warning in install.packages : packages ‘gdalUtils’, ‘gimms’, ‘ncdf4’, ‘R.utils’, ‘raster’, ‘RCurl’ are not available (for R version 3.5.2) Warning in install.packages : unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/3.5: cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/PACKAGES'
Seems to me like you either have no internet connection or sit behind a firewall that disallows R to install things.
As I could not download the HeavyRain Master from the Rstudio command line I downloaded it manually and run the following to download CHIRPS rainfall data:
chirps_africa<-getCHIRPS(region = "africa", format = "netcdf", tres = "monthly", sres = 0.05, dsn = file.path(getwd(), "data"), overwrite = FALSE, cores = 2)
The Rstudio brought the following error message: Error in serverPath() : could not find function "serverPath" Can You help me with this issue? Is there any specific thing I should I have done in order to path all necessary packages at the same time? Thanks in advance