chrisvwn / Rnightlights

R package to extract data from satellite nightlights.
GNU General Public License v3.0
47 stars 14 forks source link

Cannot replicate the Nightlights Data Extraction in R #66

Closed ShishirShakya closed 3 years ago

ShishirShakya commented 3 years ago

rm(list = ls()) dev.off(dev.list()["RStudioGD"])

ipak <- function(pkg){ new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] if (length(new.pkg)) install.packages(new.pkg, dependencies = TRUE, repos = "http://cran.us.r-project.org") sapply(pkg, require, character.only = TRUE) }

ipak(c("rstudioapi", "Rnightlights", "devtools")) devtools::install_github("chrisvwn/Rnightlights")

path <- dirname(rstudioapi::getActiveDocumentContext()$path) setwd(path)

pkgOptions(downloadMethod = "aria", cropMaskMethod = "gdal", extractMethod = "gdal", deleteTiles = TRUE)

ctry <- "KEN" #replace to run for any other country

highestAdmLevelStats <- getCtryNlData(ctryCode = ctry, admLevel = "highest", nlType = "VIIRS.M", nlPeriods = nlRange("201401", "201412","VIIRS.M"), nlStats = list("sum",na.rm=TRUE), ignoreMissing=FALSE)

The code produces the following error.

Error in vapply(paste0("configName_", nlTypes), pkgOptions) : argument "FUN.VALUE" is missing, with no default

chrisvwn commented 3 years ago

There was a change that broke the package. It has been rolled back. Please reinstall the package and try again.

chrisvwn commented 3 years ago

Closing this issue. If you are still facing the problem please reopen.