dbc_inspect: Inspect the metadata of a DATASUS DBC file without...

View source: R/dbcturbo.R

dbc_inspectR Documentation

Inspect the metadata of a DATASUS DBC file without decompressing data

Description

Reads only the DBF header embedded in the .dbc file and returns field metadata and the total record count. The compressed data payload is never touched, making this function very fast even for large files.

Usage

dbc_inspect(input_file)

Arguments

input_file

Character string. Path to the .dbc file.

Value

A named list with:

fields

A data.frame with columns name (character), type (one-character string: C=text, N=numeric, D=date, L=logical), width (integer), decimals (integer).

nrecords

Integer. Total number of records.

See Also

dbc_to_csv, dbc2dbf

Examples

dbc <- system.file("extdata", "sids.dbc", package = "dbcturbo")
meta <- dbc_inspect(dbc)
meta$nrecords
head(meta$fields)


dbcturbo documentation built on Oct. 10, 2026, 5:08 p.m.