Skip to contents

Get center coordinates

Usage

centroid(stimuli, points = NULL)

Arguments

stimuli

list of stimuli

points

which points to include (0-based); if NULL, all points will be used

Value

named matrix of centroid x and y coordinates

Examples

demo_stim() |> centroid()
#>                x        y
#> f_multi 250.0617 252.1963
#> m_multi 248.7498 242.3854

# get the centre of the eye points
demo_stim() |> centroid(0:1)
#>                x        y
#> f_multi 249.4445 226.4352
#> m_multi 248.7963 215.0000