process_cnes: Process CNES variables from DataSUS

View source: R/process_cnes.R

process_cnesR Documentation

Process CNES variables from DataSUS

Description

process_cnes processes CNES variables retrieved by fetch_datasus().

Usage

process_cnes(
  data,
  information_system = c("CNES-ST", "CNES-PF"),
  nomes = TRUE,
  municipality_data = TRUE
)

Arguments

data

data.frame created by fetch_datasus().

information_system

string. CNES-ST or CNES-PF

nomes

optional logical. TRUE by default, add FANTASIA and RAZÃO SOCIAL names to the dataset.

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 CNES-ST (Estabelecimentos) or CNES-PF (Pessoa f\u00edsica) variables retrieved by fetch_datasus(), informing labels for categoric variables including NA values.

Examples

## Not run: 
df <- fetch_datasus(year_start = 2015, month_start = 1,
                    year_end = 2015, month_end = 1,
                    uf = "RJ",
                    information_system = "CNES-ST")
df_a <- process_cnes(df, information_system = "CNES-ST")
df_b <- process_cnes(df, information_system = "CNES-ST", nomes = FALSE, municipality_data = FALSE)

## End(Not run)

rfsaldanha/microdatasus documentation built on April 13, 2024, 2:25 p.m.