prepare2plot: Data preparation mainly aimed at facilitating plotting in...

Description Usage Arguments Value

View source: R/array_transform.R

Description

prepare2plot is deprecated. Use transformArray instead.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
prepare2plot(
  dat,
  datid,
  bwFac = NULL,
  wiFac = NULL,
  collFac = NULL,
  diffFac = NULL,
  compGFP = TRUE,
  keep_channels = !compGFP,
  sc = NULL,
  datfr = TRUE,
  iaFac = NULL,
  ...
)

Arguments

dat

an array of ERP data. Must have named dimnames, one of which must be id (corresponding to participants' identification codes)

datid

data.frame consisting of identification codes ("id") and subject-level factors

bwFac

named list of between-subject factors (for splitting ERP data)

wiFac

named list of within-subject factors (for subsetting ERP data)

collFac

character vector of dimension names: average the ERP data across these dimensions

diffFac

a character vector indicating which levels of which dimensions should be subtracted. The first element is the dimension name, the 2nd and 3rd are the levels to be compared (2nd-3rd), and the 4th element corresponds to the label of the new level.

compGFP

a logical scalar; if TRUE (default), Global Field Power is also computed.

keep_channels

a logical scalar; if Global Field Power is requested, shall individual channels be included in the result (default: FALSE, if GFP is requested, ignored otherwise)

sc

if not NULL, must be a named list indicating how scaling by GFP should be done - either individually (default) or group-based, and either timepoint-by-timepoint or for averaged segments

datfr

a logical scalar (default: TRUE) determining if the resulting array shall be transformed to a data.frame

iaFac

a character vector indicating which dimensions should be combined (ia is the abbreviation of interaction), if datfr is TRUE

...

additional parameters to be passed to array2df

Value

A data.frame if datfr is TRUE, and an array if datfr is FALSE


tdeenes/eegR documentation built on April 19, 2021, 4:17 p.m.