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.

Value

a data.frame with the processed data.

Examples

process_cnes(cnes_st_sample, information_system = "CNES-ST")
process_cnes(cnes_pf_sample, information_system = "CNES-PF")


rfsaldanha/microdatasus documentation built on June 25, 2024, 2:14 a.m.