prevR in different formats (text, shapefile, dbase...).export(object, element,
format, file,
N = NULL, R = NULL, clusters.only = FALSE,
ext = NULL, sep = NULL, dec = NULL, ...
)prevR.element="boundary").rings to export (unused if element="boundary").rings to export (unused if element="boundary").clusters of object (unused if element="boundary")?element="boundary" or if format="shp").element="boundary" or if format="shp" or if format="dbf").element="boundary" or if format="shp" or if format="dbf").writePolyShape, writePointsShape, write.dbelement="boundary", the slot boundary of object will be exported as a shapefile.
Otherwise, the slot clusters, merged with the slot rings, will be exporter.
See as.data.frame.prevR for details on the use of the parameters of N, R et clusters.only.
format specifies the export format of the data frame returned by as.data.frame.prevR:
ext could be used to coerce the extension of the output filen except for shapefile export, which will write three different files (.shp, .shx et .dbf).
The "txt" format uses by default a tabulation as field separator and a point "." for decimal point. The "csv" format uses a comma "," as field separator and a point "." as decimal point.
The "csv2" format is a variant using a semicolon ";" as field separator and a colon "," for decimal point, the Excel convention for CSV files in some Western European locales.
sep and dec could be used to coerce the field separator and the decimal point (together with the "txt" format).
Packages writePolyShape {writePointsShape {write.dbf {write.table {export(fdhs, element="boundary", file="area")
export(fdhs, element="clusters", format="shp", file="points")
dhs <- rings(fdhs,N=c(100,300,500))
export(dhs, element="clusters", format="csv", N=300, file="points")Run the code above in your browser using DataLab