Skip to contents

Prepares data for reciprobit plot

Usage

prepare_data(raw_data, time_unit = "ms", name_separator = "_")

Arguments

raw_data

Vector of reaction times for a single participant, or a dataframe containing a column called time with the reaction times and optional other columns:

  • a column called name with a unique label for each dataset

  • a column called participant with a unique id per participant and another called condition with a unique label for each condition. In this case the name for each dataset will be constructed as participant+name_separator+condition.

  • a column called color that contains one hexadecimal color code for each dataset. In this case the name for each dataset will be set to be the name of the color.

time_unit

Units of the reaction times in rt_vector, must be one of "ms", "ds", or "s".

name_separator

If the raw_data dataframe does not contain a name column, but does have participant and condition columns, the name for each dataset will be constructed as participant+name_separator+condition.

Value

A dataframe with columns: time, color, name, promptness, and e_cdf.

Examples

df <- prepare_data(carpenter_williams_1995)