Skip to contents

Set stimulus names in a stimlist

Usage

rename_stim(
  stimuli,
  new_names = NULL,
  prefix = "",
  suffix = "",
  pattern = NULL,
  replacement = NULL,
  ...
)

Arguments

stimuli

A list of stimuli

new_names

Vector of new names - must be the same length as the stimlist

prefix

String to prefix to each name

suffix

String to append to each name

pattern

Pattern for gsub

replacement

Replacement for gsub

...

Additional arguments to pass on to base::gsub()

Value

A list of stimuli with the new names

See also

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

Examples

demo_stim() |>
  rename_stim(prefix = "new_") |>
  names()
#> [1] "new_f_multi" "new_m_multi"