modify tsExportdata for later export to SPSS files with haven package used by the write_tsExport function.
prepare_spss_export(tsExport, rm_stdates = TRUE, set_missings = TRUE, ...)
tsExportdata
.
Boolean. If TRUE, original secutrial string date variables will be deleted, if it has an equivalent date converted variable.
Boolean. If TRUE, generic missing values will be assigned to the data.
Additional arguments passed to prepare_spss_export
.
keep_date_vars
defines which original date variables should be kept
when rm_stdates is set to TRUE. Default: "birthdate_score", because it not
really a date and will not represented correctly in SPSS.
missing_values
and missing_labels
define variable values and/or
value labels that should be defined as missing values.
Default: missing_labels = missing_labels_default
overwrite_missing_lookup
Boolean Should a new missing value lookup
list created if the tsExportdata object already contains one? Default: TRUE
The following transformations will be made:
assign value labels for variables found in the vallab lookup.
remove factor variables if they have an equivalent numeric variable that is found in the vallab lookup.
optional assign general missing values.
optional remove original secutrial date string variables that have an equivalent variable converted to date format.