Closed nreguera closed 4 years ago
Update:
I extracted the Vietnam nightlights data again from the rasters that I already downloaded (located in the outputrasters
folder), deleting previously both STRUCT
and DATA
related files in the data
folder, and the new STRUCT
and DATA
files generated look the same. You can see them in these links:
I see lots of NAs
in the columns unknown
, unknown.1
and ward_(xã)
, so I think this may be the reason why later in the analysis I can only detect part of the admin LEVEL_1 divisions (28 out of the 63 that appear in the GADM dataset).
Hmm. You shouldn't have unknown column names with GADM. Could you provide the step-by-step code you are using?
Yes, very weird, having into account that I have used the same code for 5 countries, and vietnam is the only one that had this issue. The code is this:
ctry <- "VNM" # KHM, MMR, VNM, LAO, THA
nightlights.data <- getCtryNlData(
ctryCode = ctry,
admLevel = "admin3",
nlType = "VIIRS.M",
nlPeriods = nlRange("201204", "201812"),
ignoreMissing = FALSE,
nlStats = list("sum", na.rm=TRUE))
I have found a bug that was causing an error that I think was related to what you're experiencing. It was a simple issue but one that would occur in very isolated cases. Interestingly, I could not successfully run the above command as I was getting an error before the data was written to disk.
Could you try the latest github update and let me know if it fixes the issue?
I uninstalled it and tried to reinstall to catch the last updates, but it gives me this error:
Warning in install.packages : package ‘Rnightlights’ is not available (for R version 3.6.1)
Please install fro.github.
devtools::install_github("chrisvwn/Rnightlights")
I followed the same process as before, removing the STRUCT
and DATA
files that I had, and using the rasters previously downloaded located in the outputrasters
folder to extract the data in them, and the new files generated still contain the unknown
column names and the NAs in lots of rows values (attached in this message as a ZIP). May it be the problem in the rasters?
Please post the output from the command
Hey @nreguera . Have you had any luck with this? If not could you post the command you are running as well as the full output it produces? This would help me track down what might be going on. The steps you are following seem correct to me but something weird is going on. The rasters would not cause this issue.
Hello @chrisvwn sorry for the late reply. This is the code I executed:
library(Rnightlights)
Sys.setlocale("LC_TIME", "English")
Sys.setlocale(locale = "UTF-8")
pkgOptions(downloadMethod="aria")
pkgOptions(extractMethod = "rast", numCores=4)
pkgOptions(deleteTiles=TRUE)
ctry <- "VNM" # KHM, MMR, VNM, LAO, THA
nightlights.data <- getCtryNlData(
ctryCode = ctry,
admLevel = "admin3",
nlType = "VIIRS.M",
nlPeriods = nlRange("201204", "201812"),
ignoreMissing = FALSE,
nlStats = list("sum", na.rm=TRUE))
And this is the output:
2020-01-08 17:07:14: NlRange autodetected nlType: VIIRS.M
2020-01-08 17:07:14: ctryStruct not found. Creating
Processing missing data: VNM:VIIRS.M:VCMCFG:201204:sum, VIIRS.M:VCMCFG:201205:sum, VIIRS.M:VCMCFG:201206:sum, VIIRS.M:VCMCFG:201207:sum, VIIRS.M:VCMCFG:201208:sum, VIIRS.M:VCMCFG:201209:sum, VIIRS.M:VCMCFG:201210:sum, VIIRS.M:VCMCFG:201211:sum, VIIRS.M:VCMCFG:201212:sum, VIIRS.M:VCMCFG:201301:sum, VIIRS.M:VCMCFG:201302:sum, VIIRS.M:VCMCFG:201303:sum, VIIRS.M:VCMCFG:201304:sum, VIIRS.M:VCMCFG:201305:sum, VIIRS.M:VCMCFG:201306:sum, VIIRS.M:VCMCFG:201307:sum, VIIRS.M:VCMCFG:201308:sum, VIIRS.M:VCMCFG:201309:sum, VIIRS.M:VCMCFG:201310:sum, VIIRS.M:VCMCFG:201311:sum, VIIRS.M:VCMCFG:201312:sum, VIIRS.M:VCMCFG:201401:sum, VIIRS.M:VCMCFG:201402:sum, VIIRS.M:VCMCFG:201403:sum, VIIRS.M:VCMCFG:201404:sum, VIIRS.M:VCMCFG:201405:sum, VIIRS.M:VCMCFG:201406:sum, VIIRS.M:VCMCFG:201407:sum, VIIRS.M:VCMCFG:201408:sum, VIIRS.M:VCMCFG:201409:sum, VIIRS.M:VCMCFG:201410:sum, VIIRS.M:VCMCFG:201411:sum, VIIRS.M:VCMCFG:201412:sum, VIIRS.M:VCMCFG:201501:sum, VIIRS.M:VCMCFG:201502:sum, VIIRS.M:VCMCFG:201503:sum, VIIRS.M:VCMCFG:201504:sum, VIIRS.M:VCMCFG:201505:sum, VIIRS.M:VCMCFG:201506:sum, VIIRS.M:VCMCFG:201507:sum, VIIRS.M:VCMCFG:201508:sum, VIIRS.M:VCMCFG:201509:sum, VIIRS.M:VCMCFG:201510:sum, VIIRS.M:VCMCFG:201511:sum, VIIRS.M:VCMCFG:201512:sum, VIIRS.M:VCMCFG:201601:sum, VIIRS.M:VCMCFG:201602:sum, VIIRS.M:VCMCFG:201603:sum, VIIRS.M:VCMCFG:201604:sum, VIIRS.M:VCMCFG:201605:sum, VIIRS.M:VCMCFG:201606:sum, VIIRS.M:VCMCFG:201607:sum, VIIRS.M:VCMCFG:201608:sum, VIIRS.M:VCMCFG:201609:sum, VIIRS.M:VCMCFG:201610:sum, VIIRS.M:VCMCFG:201611:sum, VIIRS.M:VCMCFG:201612:sum, VIIRS.M:VCMCFG:201701:sum, VIIRS.M:VCMCFG:201702:sum, VIIRS.M:VCMCFG:201703:sum, VIIRS.M:VCMCFG:201704:sum, VIIRS.M:VCMCFG:201705:sum, VIIRS.M:VCMCFG:201706:sum, VIIRS.M:VCMCFG:201707:sum, VIIRS.M:VCMCFG:201708:sum, VIIRS.M:VCMCFG:201709:sum, VIIRS.M:VCMCFG:201710:sum, VIIRS.M:VCMCFG:201711:sum, VIIRS.M:VCMCFG:201712:sum, VIIRS.M:VCMCFG:201801:sum, VIIRS.M:VCMCFG:201802:sum, VIIRS.M:VCMCFG:201803:sum, VIIRS.M:VCMCFG:201804:sum, VIIRS.M:VCMCFG:201805:sum, VIIRS.M:VCMCFG:201806:sum, VIIRS.M:VCMCFG:201807:sum, VIIRS.M:VCMCFG:201808:sum, VIIRS.M:VCMCFG:201809:sum, VIIRS.M:VCMCFG:201810:sum, VIIRS.M:VCMCFG:201811:sum, VIIRS.M:VCMCFG:201812:sum. This may take a while.
Note: Set 'ignoreMissing=TRUE' to return only data found or
'ignoreMissing=NULL' to return NULL if not all the data is found
2020-01-08 17:07:20: **** START PROCESSING: ctryCodes=VNM, admLevels=list(VNM = "gadm36_VNM_3"), nlTypes=VIIRS.M, configNames=VCMCFG, multiTileStrategy=all, multiTileMergeFun=mean, removeGasFlares=TRUE, nlPeriods=c("201204", "201205", "201206", "201207", "201208", "201209", "201210", "201211", "201212", "201301", "201302", "201303", "201304", "201305", "201306", "201307", "201308", "201309", "201310", "201311", "201312", "201401", "201402", "201403", "201404", "201405", "201406", "201407", "201408", "201409", "201410", "201411", "201412", "201501", "201502", "201503", "201504", "201505", "201506", "201507", "201508", "201509", "201510", "201511", "201512", "201601", "201602", "201603", "201604", "201605",
"201606", "201607", "201608", "201609", "201610", "201611", "201612", "201701", "201702", "201703", "201704", "201705", "201706", "201707", "201708", "201709", "201710", "201711", "201712", "201801", "201802", "201803", "201804", "201805", "201806", "201807", "201808", "201809", "201810", "201811", "201812"), nlStats=list(list("sum", na.rm = TRUE)), custPolyPath=NULL, gadmVersion=3.6, gadmPolyType=shpZip, downloadMethod=aria, cropMaskMethod=rast, extractMethod=rast****
2020-01-08 17:07:20: Downloading country polygons ...
| | 0%2020-01-08 17:07:20: Downloading polygon: VNM
2020-01-08 17:07:20: Downloading ctry poly: VNM
2020-01-08 17:07:20: Downloading ctry shpZip: VNM
2020-01-08 17:07:20: Polygon dir for VNM:3.6 already exists
|=======================================================================================| 100%
2020-01-08 17:07:21: Downloading country polygons ... DONE
2020-01-08 17:07:21: **** PROCESSING nlType:VIIRS.M | configName: VCMCFG | nlPeriod:201204****
2020-01-08 17:07:21: Checking tiles required for VIIRS.M 201204
2020-01-08 17:07:21: VNM: cropped raster exists. Tile not required
2020-01-08 17:07:21: numTiles: 0, Required tiles:
2020-01-08 17:07:21: No tiles needed for 201204. Processing countries with missing stats and existing cropped rasters
2020-01-08 17:07:21: Processing ctryCode: VNM
2020-01-08 17:07:21: Processing ctryCode: VNM AdmLevel: gadm36_VNM_3
2020-01-08 17:07:21: ProcessNlCountry: ctryCode=VNM, admLevel=gadm36_VNM_3, nlType=VIIRS.M, configName=VCMCFG, multiTileStrategy=all, multiTileMergeFun=mean, removeGasFlares=TRUE, nlPeriod=201204, nlStats=list(list("sum", na.rm = TRUE)), downloadMethod=aria, cropMaskMethod=rast, extractMethod=rast, gadmVersion=3.6, gadmPolyType=shpZip, custPolyPath=NULL****
2020-01-08 17:07:21: Check for existing data file
2020-01-08 17:07:21: Data file not found. Creating ...
2020-01-08 17:07:26: Data file not found. Creating ... DONE
2020-01-08 17:07:26: Begin processing 201204
2020-01-08 17:07:26: E:/Nightligths/.Rnightlights/outputrasters/NL_VNM_VIIRS.M_201204_VCMCFG-MTSALL-MEAN-RGFT_GADM-3.6-SHPZIP.tif already exists
2020-01-08 17:07:26: Begin extracting data from the raster
|======================================================================================================================================================| 100%
2020-01-08 17:33:29: Saving nlStat 'sum(...=TRUE)' ...
2020-01-08 17:33:29: Saving nlStat 'sum' ... DONE
2020-01-08 17:33:29: DONE processing VNM 201204
2020-01-08 17:33:29: **COMPLETE. Writing data to disk
2020-01-08 17:33:29: **** PROCESSING nlType:VIIRS.M | configName: VCMCFG | nlPeriod:201205****
2020-01-08 17:33:29: Checking tiles required for VIIRS.M 201205
2020-01-08 17:33:29: VNM: cropped raster exists. Tile not required
2020-01-08 17:33:30: numTiles: 0, Required tiles:
2020-01-08 17:33:30: No tiles needed for 201205. Processing countries with missing stats and existing cropped rasters
2020-01-08 17:33:30: Processing ctryCode: VNM
2020-01-08 17:33:30: Processing ctryCode: VNM AdmLevel: gadm36_VNM_3
2020-01-08 17:33:30: ProcessNlCountry: ctryCode=VNM, admLevel=gadm36_VNM_3, nlType=VIIRS.M, configName=VCMCFG, multiTileStrategy=all, multiTileMergeFun=mean, removeGasFlares=TRUE, nlPeriod=201205, nlStats=list(list("sum", na.rm = TRUE)), downloadMethod=aria, cropMaskMethod=rast, extractMethod=rast, gadmVersion=3.6, gadmPolyType=shpZip, custPolyPath=NULL****
2020-01-08 17:33:30: Check for existing data file
2020-01-08 17:33:30: Data file found: E:/Nightligths/.Rnightlights/data/NL_DATA_VNM_ADM3_GADM-3.6-SHPZIP.csv
2020-01-08 17:33:30: Processing stats: sum(...=TRUE)
2020-01-08 17:33:30: Load country data file
2020-01-08 17:33:30: Load country polygon admin level
2020-01-08 17:33:30: Begin processing 201205
2020-01-08 17:33:30: E:/Nightligths/.Rnightlights/outputrasters/NL_VNM_VIIRS.M_201205_VCMCFG-MTSALL-MEAN-RGFT_GADM-3.6-SHPZIP.tif already exists
2020-01-08 17:33:30: Begin extracting data from the raster
|====== | 4%
Anyway, I am running late, so I will skip Vietnam data...
Noted. Let me have a look at this.
A quick note. For the NAs that you might be getting could you for now quote the arguments so that you have list("sum", "na.rm=TRUE")
. There is a bug there that I need to fix.
Ok, just let me know if you want me to test the bug fix.
I have fixed the bug. Could you try these steps:
data
and struct
filespolygons
directory.rds
files from gasflares directory (fixed warnings about different proj4 strings)numCores
pkgOption has been renamed to numThreads
)I got this error when trying to reinstall Rnightlights:
Error: Failed to install 'Rnightlights' from GitHub:
(converted from warning) cannot remove prior installation of package ‘fansi’
Could you try restarting R/RStudio after uninstalling Rnightlights then try the reinstall.
On Sun, Jan 12, 2020, 09:47 Natxo notifications@github.com wrote:
I got this error when trying to reinstall Rnightlights:
Error: Failed to install 'Rnightlights' from GitHub:
(converted from warning) cannot remove prior installation of package ‘fansi’
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chrisvwn/Rnightlights/issues/53?email_source=notifications&email_token=ABQXQOUWUIMZUCMXOVNCSR3Q5K4IPA5CNFSM4J7C73BKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWTIWA#issuecomment-573387864, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQXQOXEWPJDLI3AKTTE2JTQ5K4IPANCNFSM4J7C73BA .
I got this one:
> devtools::install_github("chrisvwn/Rnightlights")
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘fansi’
In addition: Warning message:
package ‘sp’ was built under R version 3.6.2
Please try to install fansi manually:
install.packages('fansi')
then try to reinstall.
Edit:
Also add the dependencies
option to install_github so try:
devtools::install_github("chrisvwn/Rnightlights", dependencies=TRUE)
Fansi was installed successfully:
> install.packages('fansi')
Installing package into ‘D:/Docs/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/fansi_0.4.1.zip'
Content type 'application/zip' length 223944 bytes (218 KB)
downloaded 218 KB
package ‘fansi’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Natxo\AppData\Local\Temp\RtmpY7MQ23\downloaded_packages
But I got an error in RNightlights:
> devtools::install_github("chrisvwn/Rnightlights", dependencies=TRUE)
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools custom from http://cran.r-project.org/bin/windows/Rtools/.
Downloading GitHub repo chrisvwn/Rnightlights@master
These packages have more recent versions available.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: bit (1.1-14 -> 1.1-15.1) [CRAN]
5: stringi (1.4.4 -> 1.4.5 ) [CRAN]
6: xfun (0.11 -> 0.12 ) [CRAN]
7: prettyunits (1.0.2 -> 1.1.0 ) [CRAN]
Enter one or more numbers, or an empty line to skip updates:
1
dendextend (NA -> 1.13.2 ) [CRAN]
gdalUtils (NA -> 2.0.1.14) [CRAN]
ggdendro (NA -> 0.1-20 ) [CRAN]
plotly (NA -> 4.9.1 ) [CRAN]
shinyjs (NA -> 1.1 ) [CRAN]
bit (1.1-14 -> 1.1-15.1) [CRAN]
stringi (1.4.4 -> 1.4.5 ) [CRAN]
viridis (NA -> 0.5.1 ) [CRAN]
png (NA -> 0.1-7 ) [CRAN]
leaflet.p... (NA -> 1.9.0 ) [CRAN]
tidyr (NA -> 1.0.0 ) [CRAN]
hexbin (NA -> 1.28.0 ) [CRAN]
gridExtra (NA -> 2.3 ) [CRAN]
xfun (0.11 -> 0.12 ) [CRAN]
prettyunits (1.0.2 -> 1.1.0 ) [CRAN]
Installing 15 packages: dendextend, gdalUtils, ggdendro, plotly, shinyjs, bit, stringi, viridis, png, leaflet.providers, tidyr, hexbin, gridExtra, xfun, prettyunits
Installing packages into ‘D:/Docs/R/win-library/3.6’
(as ‘lib’ is unspecified)
There are binary versions available but the source versions are later:
binary source needs_compilation
shinyjs 1.0 1.1 FALSE
bit 1.1-14 1.1-15.1 TRUE
stringi 1.4.4 1.4.5 TRUE
xfun 0.11 0.12 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/dendextend_1.13.2.zip'
Content type 'application/zip' length 5008970 bytes (4.8 MB)
downloaded 4.8 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/gdalUtils_2.0.1.14.zip'
Content type 'application/zip' length 1208985 bytes (1.2 MB)
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/ggdendro_0.1-20.zip'
Content type 'application/zip' length 135926 bytes (132 KB)
downloaded 132 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/plotly_4.9.1.zip'
Content type 'application/zip' length 2975638 bytes (2.8 MB)
downloaded 2.8 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/bit_1.1-14.zip'
Content type 'application/zip' length 248571 bytes (242 KB)
downloaded 242 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/stringi_1.4.4.zip'
Content type 'application/zip' length 15307078 bytes (14.6 MB)
downloaded 14.6 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/viridis_0.5.1.zip'
Content type 'application/zip' length 1866928 bytes (1.8 MB)
downloaded 1.8 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/png_0.1-7.zip'
Content type 'application/zip' length 292789 bytes (285 KB)
downloaded 285 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/leaflet.providers_1.9.0.zip'
Content type 'application/zip' length 50196 bytes (49 KB)
downloaded 49 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidyr_1.0.0.zip'
Content type 'application/zip' length 1294496 bytes (1.2 MB)
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/hexbin_1.28.0.zip'
Content type 'application/zip' length 992486 bytes (969 KB)
downloaded 969 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/gridExtra_2.3.zip'
Content type 'application/zip' length 1109614 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/prettyunits_1.1.0.zip'
Content type 'application/zip' length 37870 bytes (36 KB)
downloaded 36 KB
package ‘dendextend’ successfully unpacked and MD5 sums checked
package ‘gdalUtils’ successfully unpacked and MD5 sums checked
package ‘ggdendro’ successfully unpacked and MD5 sums checked
package ‘plotly’ successfully unpacked and MD5 sums checked
package ‘bit’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘viridis’ successfully unpacked and MD5 sums checked
package ‘png’ successfully unpacked and MD5 sums checked
package ‘leaflet.providers’ successfully unpacked and MD5 sums checked
package ‘tidyr’ successfully unpacked and MD5 sums checked
package ‘hexbin’ successfully unpacked and MD5 sums checked
package ‘gridExtra’ successfully unpacked and MD5 sums checked
package ‘prettyunits’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Natxo\AppData\Local\Temp\RtmpY7MQ23\downloaded_packages
installing the source packages ‘shinyjs’, ‘xfun’
trying URL 'https://cran.rstudio.com/src/contrib/shinyjs_1.1.tar.gz'
Content type 'application/x-gzip' length 957877 bytes (935 KB)
downloaded 935 KB
trying URL 'https://cran.rstudio.com/src/contrib/xfun_0.12.tar.gz'
Content type 'application/x-gzip' length 58858 bytes (57 KB)
downloaded 57 KB
* installing *source* package 'shinyjs' ...
** package 'shinyjs' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'shinyjs'
finding HTML links ... done
classFuncs html
click html
delay html
disabled html
Rd warning: C:/Users/Natxo/AppData/Local/Temp/RtmpSKdJcu/R.INSTALL26f830a37db0/shinyjs/man/disabled.Rd:48: file link 'toggleState' in package 'shinyjs' does not exist and so has been treated as a topic
Rd warning: C:/Users/Natxo/AppData/Local/Temp/RtmpSKdJcu/R.INSTALL26f830a37db0/shinyjs/man/disabled.Rd:49: file link 'enable' in package 'shinyjs' does not exist and so has been treated as a topic
Rd warning: C:/Users/Natxo/AppData/Local/Temp/RtmpSKdJcu/R.INSTALL26f830a37db0/shinyjs/man/disabled.Rd:50: file link 'disable' in package 'shinyjs' does not exist and so has been treated as a topic
extendShinyjs html
hidden html
Rd warning: C:/Users/Natxo/AppData/Local/Temp/RtmpSKdJcu/R.INSTALL26f830a37db0/shinyjs/man/hidden.Rd:49: file link 'toggle' in package 'shinyjs' does not exist and so has been treated as a topic
Rd warning: C:/Users/Natxo/AppData/Local/Temp/RtmpSKdJcu/R.INSTALL26f830a37db0/shinyjs/man/hidden.Rd:50: file link 'show' in package 'shinyjs' does not exist and so has been treated as a topic
Rd warning: C:/Users/Natxo/AppData/Local/Temp/RtmpSKdJcu/R.INSTALL26f830a37db0/shinyjs/man/hidden.Rd:51: file link 'hide' in package 'shinyjs' does not exist and so has been treated as a topic
html html
inlineCSS html
js html
messageFuncs html
onevent html
reset html
runExample html
runcode html
runjs html
shinyjs-defunct html
shinyjs html
showLog html
Rd warning: C:/Users/Natxo/AppData/Local/Temp/RtmpSKdJcu/R.INSTALL26f830a37db0/shinyjs/man/showLog.Rd:46: file link 'logjs' in package 'shinyjs' does not exist and so has been treated as a topic
stateFuncs html
useShinyjs html
Rd warning: C:/Users/Natxo/AppData/Local/Temp/RtmpSKdJcu/R.INSTALL26f830a37db0/shinyjs/man/useShinyjs.Rd:32: file link 'addResourcePath' in package 'shiny' does not exist and so has been treated as a topic
visibilityFuncs html
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (shinyjs)
* installing *source* package 'xfun' ...
** package 'xfun' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'xfun'
finding HTML links ... done
Rscript html
attr html
download_file html
embed_file html
file_ext html
file_string html
gsub_file html
in_dir html
install_dir html
install_github html
isFALSE html
is_ascii html
native_encode html
normalize_path html
numbers_to_words html
optipng html
os html
parse_only html
pkg_attach html
prose_index html
protect_math html
raw_string html
read_utf8 html
rename_seq html
rev_check html
rstudio_type html
same_path html
session_info html
split_lines html
strict_list html
stringsAsStrings html
tojson html
try_silent html
upload_ftp html
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (xfun)
The downloaded source packages are in
‘C:\Users\Natxo\AppData\Local\Temp\RtmpY7MQ23\downloaded_packages’
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools custom from http://cran.r-project.org/bin/windows/Rtools/.
Error: Failed to install 'Rnightlights' from GitHub:emp\RtmpY7MQ23\remotes9444fe54e1a\chrisvwn-Rnightlights-0a9e516/DESCRIPTION' ...
lazy-load database 'D:/Docs/R/win-library/3.6/prettyunits/R/prettyunits.rdb' is corrupt
In addition: Warning message:
In paste0(" (", pretty_dt(elapsed), ")") :
internal error -3 in R_decompress1
Okay. That is a step in the right direction. Could you try the suggested solution:
Please download and install Rtools custom from http://cran.r-project.org/bin/windows/Rtools/.
Great! The ?
characters means that the computer does not have the character set/locale to display the characters correctly. Not sure how to deal with this but you can try to install and set the locale for VNM text
Ok, we will leave this for the next project I guess.
Thank you so much for your support @chrisvwn I think I won´t disturb you for a while :)
You're welcome @nreguera . Always a pleasure!
I might have done something wrong in some point but I can´t find where.
I am just doing some merging transformations with the data, and they work fine for all the countries except for Vietnam. I have in one variable the divisions from GADM map (in the following screenshot in the variable called
VNM.provinces.map
) and in another variable the nightlights readings (in the following screenshot calledVNM.nl
). When I try to do a transformation at first level (similar to province) it tells me that the number of columns is different, and in fact they are:The data from GADM has 63 columns (red square) meanwhile the Nightlights has 28 (1 is NA) (orange square). Also I have realized that in the Nightlights data, the two administrative divisions that have
unkonwn
andunknown.1
names have the same number of levels, 28.Is it possible that an error ocurred when I downloaded this data?
Thanks.