Learn R Programming

GADMTools (version 3.9-1)

saveAs: Save your own GADM shapefile as an rds file

Description

Save a GADM shapefile (.rds)

Usage

saveAs(x, name = NULL, directory = NULL)

Arguments

x

Object - GADMWWrapper

name

String - filename

directory

String - path to an alternative directory

Value

----

Details

If directory is NULL (default), the file is stored in the same directory as specified in basefile parameter of gadm_loadCountries or gt2.loadCountries

References

----

See Also

----

Examples

Run this code
# NOT RUN {
# library(GADMTools)
# library(sp)
# France = gadm_loadCountries("FRA", level=1, basefile="./")
# Auvergne = subset(France,regions = "Auvergne", level=1)
# saveas(Auvergne, "./AUVERGNE")
# AUV <- gadm_loadCountries("AUVERGNE", level=1, basefile="./")
# plotmap(AUV)
# }

Run the code above in your browser using DataLab