Create a simple plot for objects returned from create_mnirs_data().
Usage
# S3 method for class 'mnirs'
plot(
x,
points = FALSE,
time_labels = FALSE,
n.breaks = 5,
na.omit = FALSE,
...
)Arguments
- x
Object of class "mnirs" returned from
create_mnirs_data()- points
Logical. Default is
FALSE. IfTRUEdisplaysggplot2::geom_points(). Otherwise onlyggplot2::geom_lines()is displayed.- time_labels
Logical. Default is
FALSE. IfTRUEdisplays x-axis time values formatted as "hh:mm:ss" usingformat_hmmss(). Otherwise, x-axis values are displayed as numeric.- n.breaks
A numeric value specifying the number of breaks in both x- and y-axes. Default is
5.- na.omit
Logical. Default is
FALSE. IfTRUEomits missing (NA) and non-finitec(Inf, -Inf, NaN)from display.- ...
Additional arguments.
Value
A ggplot2 object.
Examples
data <- read_mnirs(
file_path = example_mnirs("moxy_ramp"),
nirs_channels = c(smo2_left = "SmO2 Live",
smo2_right = "SmO2 Live(2)"),
time_channel = c(time = "hh:mm:ss"),
verbose = FALSE
)
## note the options to display time values as `h:mm:ss` with 8 breaks
plot(data, time_labels = TRUE, n.breaks = 8)