data_clean_sosci {volker}R Documentation

Prepare data originating from SoSci Survey

Description

The tibble remembers whether it was already prepared and the operations are only performed once in the first call.

Usage

data_clean_sosci(
  data,
  remove.na.levels = TRUE,
  remove.na.numbers = TRUE,
  add.whitespace = TRUE
)

Arguments

data

Data frame

remove.na.levels

Remove residual values from factor columns. Either a character vector with residual values or TRUE to use defaults in VLKR_NA_LEVELS. You can also define or disable residual levels by setting the global option vlkr.na.levels (e.g. options(vlkr.na.levels=c("Not answered")) or to disable options(vlkr.na.levels=FALSE)).

remove.na.numbers

Remove residual values from numeric columns. Either a numeric vector with residual values or TRUE to use defaults in VLKR_NA_NUMERIC. You can also define or disable residual values by setting the global option vlkr.na.numbers (e.g. options(vlkr.na.numbers=c(-2,-9)) or to disable options(vlkr.na.numbers=FALSE)).

add.whitespace

Add whitespace after slashes for improved label breaks.

Details

Prepares SoSci Survey data:

Value

Data frame with vlkr_df class (the class is used to prevent double preparation).

Examples

ds <- volker::chatgpt
ds <- data_clean_sosci(ds)

[Package volker version 2.0.1 Index]