| plot.mnirs_kinetics | R Documentation |
Create a default plot for an "mnirs_kinetics" object returned from
analyse_kinetics(). Observed signals are drawn per nirs_channel, faceted
by interval, with the fitted response overlaid and the key kinetics
coefficient(s) annotated per panel.
## S3 method for class 'mnirs_kinetics'
plot(x, fitted = TRUE, markers = TRUE, labels = TRUE, ...)
x |
An "mnirs_kinetics" object from |
fitted |
Logical. Default is |
markers |
Logical. Default is |
labels |
Logical. Default is |
... |
Additional arguments. |
Accepts some arguments in ..., such as label_size passed to
ggplot2::geom_text(). Also accepts args passed to plot.mnirs(), such as
points, time_labels, nrow, ncol, or scales.
A method with no annotation spec in kinetics_annotations() plots the
observed signal and fitted curve only, without markers or labels.
A ggplot2 object.
analyse_kinetics(), plot.mnirs()
result <- read_mnirs(
example_mnirs("train.red"),
nirs_channels = c(smo2 = "SmO2"),
time_channel = c(time = "Timestamp (seconds passed)"),
zero_time = TRUE,
verbose = FALSE
) |>
resample_mnirs(method = "linear", verbose = FALSE) |>
extract_intervals(
group_intervals = "distinct",
start = by_time(368, 1084),
span = c(-20, 90),
zero_time = TRUE,
verbose = FALSE
) |>
analyse_kinetics(
method = "peak_slope",
span = 10,
verbose = FALSE
)
plot(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.