Export 1 second EPOCH plot
save_plot_1s_epoch.Rd
Save the 1 second EPOCH plot as a PDF document based on the subject
or
file
parameter.
Arguments
- x
A
graphics::plot()
orggplot2::ggplot()
object to be exported.- subject
A character vector denoting the Pregnancy 24/7 subject.
- trimester
A character or integer vector denoting trimester of pregnancy.
- file
Either a path to a file, a connection, or literal data (either a single string or a raw vector). The default value is
NULL
, which uses thesubject
andtrimester
parameters to find the appropriate filename.- ...
Any other parameters needed for
grDevices::pdf()
Details
When file
is the default value of NULL
the subject
and
trimester
parameters along with the current working directory are used to
write the files that ends with _grpahic.pdf
by using the loc()
function.
As the purpose of this function is to work in the background of the
process_data()
function, a filename should only be specified when
save_plot_1s_epoch
is used outside of the process_data()
, usually for
individual examination of problematic data.
Examples
if (FALSE) { # \dontrun{
process_dat <- process_events(data = dat)
sec_by_sec <- create_1s_epoch(data = process_dat)
g <- plot_1s_epoch(sec_by_sec)
save_plot_1s_epoch(x = g, subject = "0001-AB", 1, width = 11, height = 8.5)
} # }