subset_tem: Subset template points

View source: R/tem.R

subset_temR Documentation

Subset template points

Description

Keep or delete specified template points. Points will be renumbered and line definitions will be updated. If all points in a line are deleted, the line will be removed. POint indexing is 0-based, so the first two points (usually the pupils) are 0 and 1.

Usage

subset_tem(stimuli, ..., keep = TRUE)

Arguments

stimuli

list of stimuli

...

vectors of points to keep or delete

keep

logical; whether to keep or delete the points

Value

stimlist with altered templates

See Also

Template functions auto_delin(), average_tem(), centroid(), change_lines(), delin(), draw_tem(), features(), get_point(), remove_tem(), require_tems(), same_tems(), squash_tem(), tem_def(), viz_tem_def()

Examples

# keep just the first two points
demo_stim(1) |>
  subset_tem(0:1) |>
  draw_tem(pt.size = 10)

# remove the last 10 points 
# (produces the 179-point Perception Lab template)
demo_stim(1) |>
  subset_tem(179:188, keep = FALSE) |>
  draw_tem()

# use features() to keep only points from a pre-defined set 
# "gmm" is points used for geometric morphometrics
demo_stim(1) |>
  subset_tem(features("gmm")) |>
  draw_tem()


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