dbc2dbf | R Documentation |
This function allows you decompress a DBC file. When decompressed, it becomes a regular DBF file.
dbc2dbf(input.file, output.file)
input.file |
The name of the DBC file (including extension) |
output.file |
The output file name (including extension) |
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.
Return TRUE if succeed, FALSE otherwise.
Daniela Petruzalek, daniela.petruzalek@gmail.com
The internal C code for dbc2dbf
is based on blast
decompressor and blast-dbf
(see 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
read.dbc
# 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 :)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.