{
library(dplyr)
# use madshapR_examples provided by the package
###### Example 1 : use the function to apply the attribute "data_dict" to the
# object.
data_dict <-
as_data_dict(madshapR_examples$`data_dictionary_example - as_data_dict`)
glimpse(data_dict)
###### Example 2 : use the function to shape the data dictionary formatted as
# data_dict_mlstr to data_dict object. The function mainly converts valueType
# column into corresponding typeof/class columns in 'Variables', and converts
# missing column into "na_values" column.
data_dict <- as_data_dict_mlstr(madshapR_examples$`data_dictionary_example`)
data_dict <- as_data_dict(data_dict)
glimpse(data_dict)
}
Run the code above in your browser using DataLab