chop_cs: chop_cs

View source: R/chop_cs.R

chop_csR Documentation

chop_cs

Description

Function for separating the conditioned responses into multiple pieces

Usage

chop_cs(cs, data, subj, group = NULL, prefix = "cs", na.rm = FALSE)

Arguments

cs

The column name(s) of the conditioned responses

data

A data frame containing all the relevant columns for the analyses

subj

The name of the column including the participant numbers. Unique numbers are expected

group

default to NULL

prefix

prefix to be included in the end data frame

na.rm

Whether NAs should be removed, default to FALSE

Value

A tibble with the following column names: "id" = id column; "top10per" = mean of top 10 "bottom10per" = mean of bottom 10 "minfirst = all trials minus the first one; "all" = mean of all trials; "t33per = mean of top 33 "m33per" = mean of medium 33 "b33per" = mean of bottom 33 "fhalf" = mean of first half of the trials; "lhalf" = mean of last half of the trials; "ftrial" = first trial; "ltrial" = last trial; "t20per" = mean of top 20 "b20per" = mean of bottom 20 "f2trial" = mean of first two trials; "l2trial" = mean of last two trials; "per2_X" = mean per two trials (i.e., block), with X referring to the number of block.

Examples

data(example_data)
chop_cs(cs = paste0("CSP", 1:10), data = example_data, subj = "id")

multifear documentation built on Sept. 24, 2023, 1:06 a.m.