Description Usage Arguments Examples
View source: R/main_import_functions.R
Main import function. Parses metadata and import diciontaries (in case of fwf files) to obtain import parameters for the desired subdataset and period. Then imports based on those parameters. Should not be aceessed directly, unless you are trying to extend the package, but rather though the wrapper funtions (read_CENSO, read_PNAD, etc).
1 2 3 |
dataset |
. |
ft |
file type. Indicates the subdataset within the dataset. For example: "pessoa" (person) or "domicĂlio" (household) data from the "CENSO" (Census). For a list of available ft for the period just type an invalid ft (Ex: ft = 'aasfasf') |
i |
period. Normally period in YYY format. |
metadata |
(optional) metadata for the dataset. If not provided it is obtained using the function read_metadata(dataset) |
var_translator |
(optional) a data.frame containing a subdataset (ft) specific renaming dictionary. Rows indicate the variable and the columuns the periods. |
root_path |
(optional) a path to the directory where dataset was downloaded |
file |
(optional) file to read, ignore all metadata in this case |
vars_subset |
(optional) read only selected variables( named on the dictionary for fwf files or in the first row for delimited files) |
nrows |
(optional) read only n first rows |
source_file_mark |
(optional) TRUE/FALSE , if T create a variable with the filename that the observation was imported from, useful for datasets with lots of separated files( CENSO and RAIS) |
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.