Set missing value attribute according to the missing value lookup list. If no lookup list exist in tha tsExport object or overwrite_lookup is TRUE create a new lookup list for for variables whose values match certain labels or numeric values that are generally considered as missing.

spss_missings_tsExport(
  tsExport,
  missing_labels = missing_labels_default,
  missing_values = NULL,
  overwrite_lookup = TRUE
)

Arguments

tsExport

tsExportdata.

missing_labels

character vector of value labels that are generally considered as missing values.

missing_values

numerical vector of values that are generally considered as missing values.

overwrite_lookup

Boolean Should a new missing value lookup list created when the tsExportdata object already contains one?

Value

tsExportdata with newly created missing value lookup list in export_options and `na_values` attributed variables.

Details

When a new missing value lookup list is created, it uses the value label lookup list as foundation. The value lookup list get's filtered for matching labels or values that are provided as arguments to the function. As default, missing_labels_default is used to create the lookup list. Afterwards variables found in the missing lookuplist, are converted to 'haven_labelled_spss' class which uses the the `na_values` attribute to define missing values. This attribute is set for each variable found in the missing value lookup list.

See also

[create_missing_lookup()] [spss_missings_tsExport_table()]