inst/examples/plot.R

data(EEG)
head(EEG)

# plots profiles according to groups with
# subplot-factor called dimension

# first create an HRM object
object_hrm <- hrm_test(value ~ group*dimension, subject = "subject", data = EEG)

# plot the HRM object, here we use the additional argument 'theme_bw()' for ggplot2
plot(object_hrm, legend = TRUE, legend.title = "Group", ... =  ggplot2::theme_bw() )

# same plot without a legend
# note that 'theme_bw' overwrites the standard legend properties of plot.HRM
plot(object_hrm, ... =  ggplot2::theme_bw() +
  ggplot2::theme(legend.title = ggplot2::element_blank(), legend.position="none") )

Try the HRM package in your browser

Any scripts or data that you put into this service are public.

HRM documentation built on Sept. 11, 2026, 5:06 p.m.