Description Usage Arguments Examples
ppl_plot_avg_contour
calculates the conditional average of pupil
size by Time and a specified continuous variable. It then applies a 3D smooth
(derived using gam
) over the surface and plots the
results as a contour plot.
1 2 3 |
data |
A data table object output by either |
Column |
A string specifying the column to use. |
Var |
A string containing the column name corresponding to the continuous variable. |
Averaging |
A character string indicating how the averaging should be done. "Event" (default) will produce the overall mean in the data, while "Subject" or "Item" (or, in principle, any other column name) will calculate the grand mean by that factor. |
VarLabel |
A string specifying the axis label to use for |
xlim |
A vector of two integers specifying the limits of the x-axis. |
PupilPreTheme |
A logical indicating whether the theme included with the function, or ggplot2's base theme (which any other custom theme could be added). |
Colors |
A vector of two strings specifying the colrs of the contour shading - The default values represent grayscale. |
1 2 3 4 5 6 7 8 9 | # Load example data
data("Pupilex7")
ppl_plot_avg_contour(data = Pupilex7, Column = "Pupil", Var = "TRIAL_INDEX",
VarLabel = "Trial", xlim = c(0,2000),
PupilPreTheme = TRUE, Colors = c("gray20", "gray90"))
# Please see the vignettes for detailed example usage.
# vignette("PupilPre_Plotting", package="PupilPre")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.