Skip to contents

process_sim processes SIM variables retrieved by fetch_datasus().

Usage

process_sim(data, municipality_data = TRUE)

Arguments

data

data.frame created by fetch_datasus().

municipality_data

optional logical. TRUE by default, creates new variables in the dataset informing the full name and other details about the municipality of residence.

Details

This function processes SIM variables retrieved by fetch_datasus(), informing labels for categoric variables including NA values.

Examples

if (FALSE) {
df <- fetch_datasus(year_start = 2010, year_end = 2010,
                    uf = "RJ",
                    information_system = "SIM-DO")
df_a <- process_sim(df)
df_b <- process_sim(df, municipality_data = FALSE)
}