check_raw_data: Check the Observed Data

View source: R/core_dm.R

check_raw_dataR Documentation

Check the Observed Data

Description

Checks a data set that is considered an "observed data set". Used in the internals of dRiftDM.

Usage

check_raw_data(obs_data, b_coding_column, u_value, l_value)

Arguments

obs_data

a data.frame

b_coding_column

a single string, indicating which column of obs_data indicates how each RT corresponds to the boundaries.

u_value, l_value

the value within the b_coding_column column that specifies the upper/lower boundary

Details

Checks:

  • if obs_data is a data.frame

  • For missing Values, and drops rows with missing values

  • if "RT", b_coding_column, and "Cond" column are present

  • if "Cond" is of type character, and if not casts it to character

  • if RT is of type numeric, and of not casts it to numeric

  • RTs are >= 0

  • that the values in b_coding_column match with u_value and l_value (casts the column if necessary)

  • if b_coding_column has only 1 or 2 unique values

  • When IDs are present, if each ID has values on each condition. At the same time unused factor levels are dropped drop_levels_ID_column

Value

the obs_data for convenience (with edits as listed under Details).


dRiftDM documentation built on April 3, 2025, 7:48 p.m.