% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interpret.R
\name{interpret_records}
\alias{interpret_records}
\alias{interpret_tables}
\title{Normalize structured interpretation sources}
\usage{
interpret_records(
  sources,
  plan,
  output = c("records", "text"),
  missing = c("error", "skip", "warn"),
  method = NULL,
  digits = 3
)

interpret_tables(sources, spec, ...)
}
\arguments{
\item{sources}{named list of interpretation sources. Each source can be a
\code{data.frame}/\code{BayesTools_table}, or a list with entries
\code{data}, optional \code{type}, and optional per-source \code{schema}.
Supported source types are \code{"table"}, \code{"record"}, and
\code{"records"}. Table schemas can define columns such as \code{row},
\code{BF}, \code{central}, \code{lower}, \code{upper}, and metadata such as
\code{BF_orientation}, \code{BF_scale}, \code{BF_name},
\code{BF_bound_operator}, \code{lower_prob}, \code{upper_prob},
\code{interval_level}, \code{units}, and \code{conditioning}.}

\item{plan}{ordered list specifying which records to create. Plan items can
have \code{kind = "evidence"}, \code{"estimate"}, \code{"pair"},
\code{"test_estimate"}, \code{"for_each"}, \code{"header"}, \code{"note"},
\code{"prior"}, or \code{"footnote"}. Pair items contain \code{evidence}
and/or \code{estimate} references. Dynamic \code{"for_each"} items generate
records from source row order.}

\item{output}{whether to return normalized \code{"records"} or a simple
generic \code{"text"} rendering. Downstream packages should usually request
\code{"records"} and render domain-specific text themselves.}

\item{missing}{how missing optional sources or rows should be handled.}

\item{method}{optional method name used only by the generic text renderer.}

\item{digits}{number of digits used only by the generic text renderer.}

\item{spec}{alias for \code{plan} used by \code{interpret_tables}.}

\item{...}{additional arguments passed from \code{interpret_tables} to
\code{interpret_records}.}
}
\value{
\code{interpret_records} returns a data frame with class
\code{"BayesTools_interpret_records"} when \code{output = "records"}, or a
character vector when \code{output = "text"}. \code{interpret_tables} is a
convenience wrapper around \code{interpret_records}.
}
\description{
\code{interpret_records} normalizes interpretation inputs from
one or more structured sources into traceable evidence, estimate, header,
note, prior, and footnote records. It is intended for downstream packages
that already own the domain-specific ordering and wording of an
interpretation, but want BayesTools to consistently extract table rows,
preserve Bayes-factor metadata, and carry traceability information.
}
