Skip to contents

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

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

Arguments

stimuli

list of stimuli

...

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

Value

list of stimuli with info added

Details

You can also add data as named vectors.

See also

Other info: compare(), get_info(), get_point(), height(), metrics(), rename_stim(), width()

Examples

stimuli <- demo_stim() |>
  add_info(project = "XXX", gender = c("F", "M"))

stimuli$f_multi$info |> str()
#> List of 2
#>  $ project: chr "XXX"
#>  $ gender : chr "F"