vapour (version 0.2.0)

vapour_report_attributes: Read feature field attributes types.

Description

Obtains the internal type-constant name for the data attributes in a source. Use this to compare the interpreted versions converted into R types by vapour_read_attributes.

Usage

vapour_report_attributes(dsource, layer = 0L, sql = "")

Arguments

dsource

data source name (path to file, connection string, URL)

layer

integer of layer to work with, defaults to the first (0) or the name of the layer

sql

if not empty this is executed against the data source (layer will be ignored)

Details

These are defined for the enum OGRFieldType in GDAL itself. https://gdal.org/ogr__core_8h.html#a787194bea637faf12d61643124a7c9fc

Examples

Run this code
# NOT RUN {
file <- "list_locality_postcode_meander_valley.tab"
mvfile <- system.file(file.path("extdata/tab", file), package="vapour")
vapour_report_attributes(mvfile)

## modified by sql argument
vapour_report_attributes(mvfile,
  sql = "SELECT POSTCODE, NAME FROM list_locality_postcode_meander_valley")
# }

Run the code above in your browser using DataCamp Workspace