# Get sample data directory
pkg <- system.file("extdata", package = "fetch")
# Create import spec
spc <- import_spec(TRTSDT = "date=%d%b%Y",
TRTEDT = "date=%d%b%Y")
# Create catalog without filter
ct <- catalog(pkg, engines$csv, import_specs = spc)
# Get dictionary for ADVS with Import Spec
d <- ct$ADVS
# Observe data types for TRTSDT and TRTEDT are now Dates
d[d$Column %in% c("TRTSDT", "TRTEDT"), ]
# data item 'ADVS': 37 cols 3617 rows
#- Engine: csv
#- Size: 1.1 Mb
#- Last Modified: 2020-09-18 14:30:22
# Name Column Class Label Format NAs MaxChar
#16 ADVS TRTSDT Date NA 54 10
#17 ADVS TRTEDT Date NA 119 10
Run the code above in your browser using DataLab