plot.PupillometryR: Pre-prepared plots of PupillometryR data

View source: R/plot_pupil_data.R

plot.PupillometryRR Documentation

Pre-prepared plots of PupillometryR data

Description

The plot functions are designed to run with just data and pupil selections, with some additional options for fun with plotting. This allows to see raw data as points, grouped by either subject or condition.

Usage

## S3 method for class 'PupillometryR'
plot(
  x,
  pupil,
  group = c("none", "condition", "subject"),
  geom = c("point", "line", "pointrange"),
  model = NULL,
  ...
)

Arguments

x

A PupillometryR dataframe

pupil

Column name of pupil data to be plotted

group

What to group the data by (none, condition, or subject)

geom

Geom to pass to ggplot. Either point, line, or pointrange.

model

Optional argument to plot agains a fitted model

...

Ignored

Value

A ggplot object

Examples

Sdata <- make_pupillometryr_data(data = pupil_data,
subject = ID,
trial = Trial,
time = Time,
condition = Type)
Sdata2 <- downsample_time_data(data = Sdata,
pupil = LPupil,
timebin_size = 100,
option = 'median')
p <- plot(Sdata2, pupil = LPupil, group = 'subject')
p


samhforbes/PupillometryR documentation built on Sept. 25, 2023, 10:19 a.m.