chrisvwn / Rnightlights

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

Issue with Example Code #3

Closed mhudecheck closed 6 years ago

mhudecheck commented 6 years ago

I'm trying to run through the introductory code. However, I keep on getting the following error:

Error in file.rename(file.path(getNlDir("dirNlTiles"), tgzAvgRadFilename), : 'from' and 'to' are of different lengths

The code I'm running is:

lowestAdmLevelStats <- getCtryNlData(ctryCode = 'KEN', nlType = "VIIRS", nlPeriods = nlRange("201401", "201412"), ignoreMissing=FALSE')

chrisvwn commented 6 years ago

@mhudecheck This is caused by a change in the naming of the files inside the .tgz tiles (after they trimmed the number of decimal places in the rasters to 100). The update is on the way to CRAN but in the meantime you can use the development version. You can install the dev version using:

devtools::install_github("chrisvwn/Rnightlights")

mhudecheck commented 6 years ago

@chrisvwn It looks like it's working now. Appreciate the quick reply & fix!!! 👍