% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_mnirs.R
\name{create_mnirs_data}
\alias{create_mnirs_data}
\title{Create an \emph{{mnirs}} data frame with metadata}
\usage{
create_mnirs_data(data, ...)
}
\arguments{
\item{data}{A data frame with existing metadata (accessed with
\code{attributes(data)}).}

\item{...}{Additional arguments with metadata to add to the data frame.
Can be either seperate named arguments or a list of named values.
\itemize{
\item nirs_device
\item nirs_channels
\item time_channel
\item event_channel
\item sample_rate
\item start_timestamp
\item interval_times
\item interval_span
}}
}
\value{
A \link[tibble:tibble-package]{tibble} of class \code{"mnirs"}. Metadata are stored
as attributes and can be accessed with \code{attributes(data)}.
}
\description{
Manually add class \code{"mnirs"} and metadata to an existing data frame.
}
\details{
Typically will only be called internally, but can be used to inject
\emph{{mnirs}} metadata into any data frame.
}
\examples{
data <- data.frame(
    A = 1:3,
    B = seq(10, 30, 10),
    C = seq(11, 33, 11)
)

attributes(data)

## inject metadata
nirs_data <- create_mnirs_data(
    data,
    nirs_channels = c("B", "C"),
    time_channel = "A",
    sample_rate = 1
)

attributes(nirs_data)

}
