data_prepare: Prepare data for calculation

View source: R/clean.R

data_prepareR Documentation

Prepare data for calculation

Description

Clean data, check column selection, remove cases with missing values

Usage

data_prepare(
  data,
  cols,
  cross,
  cols.categorical,
  cols.numeric,
  cols.reverse,
  clean = TRUE
)

Arguments

data

Data frame to be prepared.

cols

The first column selection.

cross

The second column selection.

cols.categorical

A tidy selection of columns to be checked for categorical values.

cols.numeric

A tidy selection of columns to be converted to numeric values.

cols.reverse

A tidy selection of columns with reversed codings.

clean

Whether to clean data using data_clean.

Value

Prepared data frame.

Examples

data <- volker::chatgpt
data_prepare(data, sd_age, sd_gender)


volker documentation built on April 12, 2025, 9:16 a.m.