dbc2dbf: Decompress a DBC file

View source: R/dbc2dbf.R

dbc2dbfR Documentation

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)

Arguments

input.file

The name of the DBC file (including extension)

output.file

The output file name (including extension)

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.

Value

Return TRUE if succeed, FALSE otherwise.

Author(s)

Daniela Petruzalek, daniela.petruzalek@gmail.com

Source

The internal C code for dbc2dbf is based on blast decompressor and blast-dbf (see References).

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

# 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 :)


read.dbc documentation built on May 29, 2024, 3:06 a.m.