plot_AOI_growth: Plots absolute or proportional time spent in AOIs over time

View source: R/plot_AOI_growth.R

plot_AOI_growthR Documentation

Plots absolute or proportional time spent in AOIs over time

Description

A visualisation tool for plotting the changes in defined AOI regions across a single trial time.

Usage

plot_AOI_growth(
  data = NULL,
  AOIs = NULL,
  AOI_names = NULL,
  type = NULL,
  trial_number = NULL,
  plot_time_not_in_AOI = FALSE
)

Arguments

data

raw data in standard raw data form (time, x, y, trial)

AOIs

A dataframe of areas of interest (AOIs), with one row per AOI (x, y, width_radius, height)

AOI_names

An optional vector of AOI names to replace the default "AOI_1", "AOI_2", etc. To omit AOIs from the plot, use NA in relevant vector position

type

either "abs" (absolute) or "prop" (proportion)

trial_number

can be used to select particular trials within the data

plot_time_not_in_AOI

boolean as to whether to include proportion of time spent outside AOIs

Value

a plot of the raw data

Examples



data <- combine_eyes(HCL)
data <- data[data$pNum == 118 & data$trial == 1,]
data <- interpolate(data)
# plot absolute and then proportional
plot_AOI_growth(data = data, AOIs = HCL_AOIs, type = "abs")
plot_AOI_growth(data = data, AOIs = HCL_AOIs, type = "prop")



tombeesley/eyetools documentation built on Dec. 23, 2024, 12:36 a.m.