add_info: Add Information

Description Usage Arguments Details Value Examples

View source: R/add_info.R

Description

Add info with a data table that contains the info in either the same order as the stimulus list, or matching the stimuli item name with the column specified by .by.

Usage

1
add_info(stimuli, ..., .by = NULL)

Arguments

stimuli

list of class stimlist

...

data table or named vectors of info to add

.by

the column to use to match info to stimuli names; leave NULL if the data are to be matched by order

Details

You can also add data as named vectors.

Value

stimlist with info added

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
stimuli <- demo_stim() %>%
  add_info(project = "XXX", gender = c("F", "M"))

stimuli$f_multi$info %>% str()

info <- data("london_info", package = "webmorphR")
stimuli <- demo_stim("london") %>%
  add_info(london_info)

stimuli$`018_03`$info %>% str()

facelab/webmorph documentation built on April 11, 2021, 6:34 a.m.