datExportData: Spatial - Exports a data frame object.

View source: R/datExportData.R

datExportDataR Documentation

Spatial - Exports a data frame object.

Description

Exports a data frame object to a specified output.

Usage

datExportData(
  dfobj,
  create_dsn = FALSE,
  index.unique = NULL,
  index = NULL,
  savedata_opts = savedata_options(),
  dbconn = NULL,
  dbconnopen = FALSE
)

Arguments

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.

Details

Wrapper for sf::st_write function.

Value

An sf spatial object is written to the out_dsn.

Note

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.

Author(s)

Tracey S. Frescino


FIESTAutils documentation built on May 29, 2024, 4:06 a.m.