datasus.init: Initialize DATASUS environment

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/datasus.R

Description

datasus.init initializes the environment that contains the DATASUS package control variables, like the locations for the DATASUS ftp and the local working directory.

Usage

1
datasus.init(workdir = tempdir(), language = "en")

Arguments

workdir

character. The local directory where to store de downloaded data. Defaults to tempdir().

language

character. Selects the default language for column names. Valid values are: "en" for English and "pt" for Portuguese. Defaults to English.

Details

This function prepares the datasus.env environment. You can specify the DATASUS working directory with the parameter workdir to set the local directory where to store the downloaded DATASUS files.

If the working directory is not specified, the default behaviour is to create a temporary directory. Please beware that when working with massive amounts of data, it's highly recommendable to set a local working directory, to preserve both local and DATASUS bandwidth. Please use this behaviour wisely!

Value

nothing

Note

DATASUS is the name of the Department of Informatics of the Brazilian Unified Health System (SUS) 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. The name DATASUS is also often used to represent the public datasets they provide.

Neither this project, nor its author, has any association with the brazilian government.

Author(s)

Daniela Petruzalek, daniela.petruzalek@gmail.com

See Also

read.dbc

Examples

1
datasus.init("~/datasus")

danicat/datasus documentation built on Feb. 8, 2020, 1:18 p.m.