plot_events: Plot each event within a group to a directory

Description Usage Arguments Value Examples

View source: R/plotting.R

Description

plot_events plots each event in a group as a multi-panel plot and saves it into specified directory.

Usage

1
2
plot_events(data = data, Column = NULL, Grouping = "Subject",
  Nrow = 1, Ncol = 1, Device = "pdf", ...)

Arguments

data

A data table object output by ppl_select_recorded_eye.

Column

A character string indicating the column to plot.

Grouping

A character string indicating the column to serve as the grouping. For example, "Subject" will use the subject identifier, producing one image per subject containing all the events for that subject.

Nrow

= A number specifying how many rows per page.

Ncol

= A number specifying how many columns per page.

Device

A character string indicating device type passed to ggsave. By default, this is set to "pdf".

...

Arguments to be passed to ggsave.

Value

Files containing plots.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Load example data
data("Pupilex3")

# Writing files to temporary folder for the example
plot_events(Pupilex3, Column = "Pupil", Device = "pdf",
            Grouping = "Subject", path = paste0(tempdir(),"/Figs"),
            Nrow = 1, Ncol = 1, width = 11, height = 8.5)

# Please see the vignettes for detailed example usage.
# vignette("PupilPre_Plotting", package="PupilPre")

PupilPre documentation built on March 14, 2020, 1:08 a.m.