read_stim: Read stimuli

read_stimR Documentation

Read stimuli

Description

Read images and templates from a directory.

Usage

read_stim(path, pattern = NULL, breaks = "/")

Arguments

path

Path to directory containing image and/or template files (or a single file path)

pattern

Vector of patterns to use to search for files, or a vector of image indices (e.g., 1:4 selects the first 4 images and their templates if they exist)

breaks

a vector of characters used to determine the stimulus names from the file names

Value

a list of stimuli

See Also

Stimulus creating functions animate(), as_stimlist(), blank(), new_stimlist(), new_stim(), read_img(), read_tem(), write_stim()

Examples

path <- system.file("extdata/test", package = "webmorphR")

# read in all images and templates in a directory
stimuli <- read_stim(path)

# read in just images and templates with "m_"
m_stimuli <- read_stim(path, "m_")


webmorphR documentation built on June 2, 2022, 5:07 p.m.