View source: R/vapour_input_attributes.R
vapour_report_fields | R Documentation |
Obtains the internal type-constant name for the data attributes in a source.
vapour_report_fields(dsource, layer = 0L, sql = "")
vapour_report_attributes(dsource, layer = 0L, sql = "")
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) |
Use this to compare the interpreted versions converted into R types by
vapour_read_fields
.
This and vapour_read_fields()
are aliased to older versions named 'vapour_report_attributes()' and
'vapour_read_attributes()', but "field" is a clearer and more sensible name (in our opinion).
These are defined for the enum OGRFieldType in GDAL itself. https://gdal.org/doxygen/ogr__core_8h.html#a787194bea637faf12d61643124a7c9fc
named character vector of the GDAL types for each field
file <- "list_locality_postcode_meander_valley.tab"
mvfile <- system.file(file.path("extdata/tab", file), package="vapour")
vapour_report_fields(mvfile)
## modified by sql argument
vapour_report_fields(mvfile,
sql = "SELECT POSTCODE, NAME FROM list_locality_postcode_meander_valley")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.