I have to download data from a webpage https://nsidc.org/data/g02158.
Now, I found a package in GitHub repository to do the same.
Link to GitHub Package:https://github.com/jpshanno/nohrsc
First, I tried running the following code:
install.packages("remotes")
library(remotes)
remotes::install_github("jpshanno/nohrsc")
library(nohrsc)
rasters <-
nsa_get_snodas(region="North America", product = c("snow water equivalent", "snow melt"),
start.date = "2016-04-01",
end.date = "2016-04-03",
path = "snodas")
The error I received was:
Error in region %in% c("CONUS", "North America") :
object 'region' not found
Called from: region %in% c("CONUS", "North America")
Now, referring to the base function defined in https://github.com/jpshanno/nohrsc/blob/master/R/nsa_get_snodas.R, I made the following change in code:
library(nohrsc)
rasters <-
nsa_get_snodas(region="North America", product = c("snow water equivalent", "snow melt"),
start.date = "2016-04-01",
end.date = "2016-04-03",
region = "North America",
path = "snodas")
But, I again received error:
Error in nsa_get_snodas(region = "North America", product = c("snow water equivalent", :
unused argument (region = "North America")
question from:
https://stackoverflow.com/questions/65865779/receiving-error-unused-argument-in-r-while-using-a-package-from-github 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…