| validate_mnirs | R Documentation |
{mnirs} parametersResolve and validate mnirs metadata and perform basic data quality checks.
validate_numeric(
x,
elements = Inf,
range = NULL,
inclusive = c("left", "right"),
integer = FALSE,
allow_na = FALSE,
msg1 = "",
msg2 = ""
)
validate_mnirs_data(data, ncol = 2L)
validate_nirs_channels(
nirs_channels,
data,
verbose = FALSE,
as_list = FALSE,
env = rlang::caller_env()
)
validate_time_channel(time_channel, data, env = rlang::caller_env())
validate_event_channel(
event_channel,
data,
required = TRUE,
env = rlang::caller_env()
)
estimate_sample_rate(x)
validate_sample_rate(data, time_channel, sample_rate, verbose = TRUE)
validate_width_span(width = NULL, span = NULL, verbose = TRUE, msg = "")
validate_x_t(x, t, allow_na = FALSE)
x |
A numeric vector. |
elements |
An integer. Default is |
range |
A two-element numeric vector giving the valid range for |
inclusive |
A character vector specifying which boundaries of |
integer |
Logical. Default is |
allow_na |
Logical. Default is |
msg1, msg2 |
A character string appended to the |
data |
A data frame of class "mnirs" containing time series data and metadata. |
nirs_channels |
A character vector giving the names of mNIRS columns to
operate on. Must match column names in
|
verbose |
Logical. Default is |
as_list |
Logical. Default is |
time_channel |
A character string naming the time or sample column.
Must match a column name in
|
event_channel |
A character string naming the event/lap column. Must
match a column name in
|
required |
Logical. Default is |
sample_rate |
A numeric sample rate in Hz.
|
validate_mnirs() is an internal documentation topic for a set of
validators used throughout the package. These validators:
Prefer explicit user-supplied arguments.
Fall back to "mnirs" metadata attributes when available.
Fail fast with informative cli::cli_abort() messages when values are
missing or invalid.
Returns the validated object (e.g. a resolved time_channel
string), or invisibly returns NULL for successful validations. On
failure, an error is thrown via cli::cli_abort().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.