View source: R/datExportData.R
datExportData | R Documentation |
Exports a data frame object to a specified output.
datExportData(
dfobj,
create_dsn = FALSE,
index.unique = NULL,
index = NULL,
savedata_opts = savedata_options(),
dbconn = NULL,
dbconnopen = FALSE
)
dfobj |
Data.frame class R object. Data frame object to export. |
create_dsn |
Boolean. |
index.unique |
String. Name of variable(s) in dfobj to make unique index. |
index |
String. Name of variable(s) in dfobj to make (non-unique) index. dbconnopen Logical. If TRUE, keep database connection open. |
savedata_opts |
List. See help(savedata_options()) for a list of options. |
dbconn |
Open database connection. |
dbconnopen |
Logical. If TRUE, keep database connection open. |
Wrapper for sf::st_write function.
An sf spatial object is written to the out_dsn.
If out_fmt='shp':
The ESRI shapefile driver truncates variable
names to 10 characters or less. Variable names are changed before export
using an internal function (trunc10shp). Name changes are output to the
outfolder, 'outshpnm'_newnames.csv.
If sf object has more than 1 record, it cannot be exported to a shapefile.
Tracey S. Frescino
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.