Set or get options for the Rnightlights package
pkgOptions(...)Option names to retrieve option values or [key]=[value] pairs to set options.
if an option name is supplied as a parameter this returns the value, else a list of all options is returned.
The following options are supported
cropMaskMethod(character) The method to use to
clip the nightlight raster tiles to the country boundaries
deleteTiles(character) whether to delete tiles
after processing may be useful where diskspace is a concern
dirNlData(character) The directory to store
the extracted data files in
dirNlDataPathcharacter) The root directory
storing the package data
dirNlTiles(character) The directory in which
to store the downloaded VIIRS raster tiles
dirPolygon(character) The directory to store
the downloaded country administration level polygons
dirRasterOutput(character) The directory in
which to store the clipped country rasters
dirRasterWeb(character) The directory in which
to store the rasters resampled for web display
dirZonals(character) The directory in which to
store the zonal statistics country polygon
downloadMethod(character) The download method
to use
extractMethod(character) The method to use to
extract data from the rasters
gdalCacheMax(character) The maximum memory gdal
should use in gdal_rasterize
ntLtsIndexUrlOLS(character) The url with the OLS
tile index
ntLtsIndexUrlVIIRS(character) The url with the
VIIRS tile index
numCores(character) The number of processor cores
to use when extractMethod = "raster"
omitCountries(character) The countries to exclude
in processing
stats(character) The statistics to calculate for
country regions. The default are sum and mean. Any other aggregate
statistics can be included. Also any aggregate function accessible
in the current environment can be added.
tmpDir(character) Change the temporary directory
for processing rasters. Not in use
# NOT RUN {
#retrieve the current cropMaskMethod
pkgOptions("cropMaskMethod")
#set the cropMaskMethod
pkgOptions(cropMaskMethod="gdal")
#retrieve all options
pkgOptions()
# }
Run the code above in your browser using DataLab