dataset_zap_data_dict {madshapR}R Documentation

Remove labels (attributes) from a data frame, leaving its unlabelled columns

Description

Removes any attributes attached to a data frame. Any value in columns will be preserved. Any 'Date' (typeof) column will be recast as character to preserve information.

Usage

dataset_zap_data_dict(dataset, zap_factor = FALSE)

Arguments

dataset

A dataset object.

zap_factor

Whether the factor column should be coerced with its corresponding valueType. FALSE by default.

Details

A dataset is a data table containing variables. A dataset object is a data frame and can be associated with a data dictionary. If no data dictionary is provided with a dataset, a minimum workable data dictionary will be generated as needed within relevant functions. Identifier variable(s) for indexing can be specified by the user. The id values must be non-missing and will be used in functions that require it. If no identifier variable is specified, indexing is handled automatically by the function.

Value

A data frame identifying a dataset.

See Also

haven::zap_labels().

Examples

{

# use madshapR_examples provided by the package

dataset <- madshapR_examples$`dataset_example`
data_dict <- as_data_dict_mlstr(madshapR_examples$`data_dictionary_example`)
dataset <- data_dict_apply(dataset,data_dict)
unlabbeled_dataset <- dataset_zap_data_dict(dataset)

head(unlabbeled_dataset)

}


[Package madshapR version 2.0.0 Index]