read.dbc | R Documentation |
This function allows you to read a DBC (compressed DBF) file into a data frame. Please note that this is the file format used by the Brazilian Ministry of Health (DATASUS), and it is not related to the FoxPro or CANdb DBC file formats.
read.dbc(file, ...)
file |
The name of the DBC file (including extension) |
... |
Further arguments to be passed to |
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 make available public healthcare datasets (by it's agency called DATASUS).
read.dbc
relies on the dbc2dbf
function to decompress the DBC into a temporary DBF file.
After decompressing, it reads the temporary DBF file into a data.frame
using read.dbf
from the foreign
package.
A data.frame of the data from the DBC file.
DATASUS is the name of the Department of Informatics of the Brazilian Health System and is resposible for publishing public healthcare data. Besides the DATASUS, the Brazilian National Agency for Supplementary Health (ANS) also uses this file format for its public data.
This function was tested using files from both DATASUS and ANS to ensure compliance with the format, and hence ensure its usability by researchers.
As a final note, neither this project, nor its author, has any association with the brazilian government.
Daniela Petruzalek, daniela.petruzalek@gmail.com
dbc2dbf
# The 'sids.dbc' file is the compressed version of 'sids.dbf' from the "foreign" package.
file <- system.file("files/sids.dbc", package="read.dbc")
sids <- read.dbc(file)
str(sids)
summary(sids)
# This is a small subset of U.S. NOAA storm database.
file <- system.file("files/storm.dbc", package="read.dbc")
storm <- read.dbc(file)
head(storm)
str(storm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.