Learn R Programming

volker (version 3.1.0)

data_prepare: 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
)

Value

Prepared data frame.

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.

Examples

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

Run the code above in your browser using DataLab