Checks a list of stimuli for templates and omits images without a template. If all_same = TRUE, checks that all the templates are the same type. Errors if no images have a template or not all templates are the same (when all_same == TRUE).
Arguments
- stimuli
list of stimuli
- all_same
logical; whether all images should have the same template
See also
Template functions
auto_delin()
,
average_tem()
,
centroid()
,
change_lines()
,
delin()
,
draw_tem()
,
features()
,
get_point()
,
remove_tem()
,
same_tems()
,
squash_tem()
,
subset_tem()
,
tem_def()
,
viz_tem_def()
Examples
stimuli <- demo_stim()
have_tems <- require_tems(stimuli)
if (FALSE) {
# produces an error because no tems
no_tems <- stimuli |> remove_tem()
require_tems(no_tems)
# warns that some images were removed
mix_tems <- c(stimuli, no_tems)
have_tems <- require_tems(mix_tems)
# produces an error because tems are different
demo_tems() |> require_tems(all_same = TRUE)
}