Learn R Programming

read.dbc (version 1.0.7)

dbc2dbf: Decompress a DBC file

Description

This function allows you decompress a DBC file. When decompressed, it becomes a regular DBF file.

Usage

dbc2dbf(input.file, output.file)

Value

Return TRUE if succeed, FALSE otherwise.

Arguments

input.file

The name of the DBC file (including extension)

output.file

The output file name (including extension)

Author

Daniela Petruzalek, daniela.petruzalek@gmail.com

Details

DBC is the extension for compressed DBF files (from the 'XBASE' family of databases). This is a proprietary file format used by the Brazilian government to publish public healthcare data. When decompressed, it becomes a regular DBF file.

Please note that this is the file format is not related to the FoxPro or CANdb DBC file formats.

References

blast source code in C: https://github.com/madler/zlib/tree/master/contrib/blast blast-dbf, DBC to DBF command-line decompression tool: https://github.com/eaglebh/blast-dbf

See Also

read.dbc

Examples

Run this code
# Input file name
input  <- system.file("files/sids.dbc", package = "read.dbc")

# Output file name
output <- tempfile(fileext = ".dbc")

# The call returns TRUE on success
if( dbc2dbf(input.file = input, output.file = output) ) {
     print("File decompressed!")
     # do things with the file
}

file.remove(output) # clean up example, don't do in real life :)

Run the code above in your browser using DataLab