read_macro: Read MACRO data with metadata attributes

Description Usage Arguments Value Examples

View source: R/readmacro.R

Description

Read macro data and corresponding CLU and DLU data. Apply DLU and CLU data as variable label and value labels.

Usage

1
read_macro(path, file_name, read_meta = TRUE, date_format = "%d/%m/%Y")

Arguments

path

Path of the data.

file_name

Filename of the dataset. This filename will also be used to DLU and CLU file if 'read_meta' is set to 'TRUE'.

read_meta

If set to 'TRUE' (default), DLU and CLU file will be used to create variable label and value labels.

date_format

The format of the date in the dataset to convert it to date, the default format is '%d/%m/%Y'.

Value

A data.frame with variable and value label attributes.

Examples

1
2
3
4
## Not run: 
dt <- read_macro(path = "data_raw", file_name = "test_data_csv.csv")

## End(Not run)

adayim/cctab documentation built on Dec. 18, 2021, 10:26 p.m.