createDF {DMCfun}R Documentation

createDF

Description

Create dataframe (see also addDataDF)

Usage

createDF(
  nSubjects = 20,
  nTrl = 50,
  design = list(A = c("A1", "A2"), B = c("B1", "B2"))
)

Arguments

nSubjects

Number of subjects

nTrl

Number of trials per factor/level for each participant

design

Factors and levels

Value

DataFrame with Subject, Factor(s) columns

Examples

# Example 1
dat <- createDF()

# Example 2
dat <- createDF(nSubjects = 50, nTrl = 50, design = list("Comp" = c("comp", "incomp")))

# Example 3
dat <- createDF(nSubjects = 50, nTrl = 50, design = list("Comp" = c("comp", "incomp"),
                                                         "Side" = c("left", "right", "middle")))


[Package DMCfun version 2.0.2 Index]