| plot.mnirs | R Documentation |
Create a base plot for data frames or lists of data frames with class "mnirs".
## S3 method for class 'mnirs'
plot(
x,
points = FALSE,
time_labels = FALSE,
n.breaks = 5,
na.omit = FALSE,
...
)
x |
Data frame or list of data frames of class "mnirs" (e.g. from
|
points |
Logical. Default is |
time_labels |
Logical. Default is |
n.breaks |
A numeric value specifying the number of breaks in both
x- and y-axes. Default is |
na.omit |
Logical. Default is |
... |
Additional arguments. |
When x is a named list of "mnirs" data frames, elements are bound into a
single data frame and displayed as faceted panels via
ggplot2::facet_wrap().
Arguments in ... are currently passed to ggplot2::facet_wrap()
formals, such as nrow, ncol, and scales for more precise control.
A ggplot2 object.
data <- read_mnirs(
example_mnirs("train.red"),
nirs_channels = c(smo2 = "SmO2"),
time_channel = c(time = "Timestamp (seconds passed)"),
verbose = FALSE
)
## plot time labels as "hh:mm:ss"
plot(data, time_labels = TRUE)
data_list <- extract_intervals(
data,
start = by_time(2452, 3168),
span = c(-60, 120),
verbose = FALSE
)
## plot a list of mnirs data frames as faceted panels
plot(data_list, time_labels = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.