\name{qqkrls_to_matrix}
\alias{qqkrls_to_matrix}
\alias{qqkrls_export}
\title{Helpers for QQKRLS results}
\usage{
qqkrls_to_matrix(qqkrls_result, value = "coefficient")
qqkrls_export(qqkrls_result, file, digits = 4)
}
\arguments{
\item{qqkrls_result}{A \code{qqkrls} object.}
\item{value}{Column to pivot: \code{"coefficient"} (default),
   \code{"std_error"}, \code{"t_value"}, \code{"p_value"}.}
\item{file}{Output file path for CSV export.}
\item{digits}{Rounding digits for CSV export.}
}
\value{Numeric matrix or NULL (invisible).}
\description{Pivot QQKRLS results into a matrix or export them to CSV.}
\examples{
## Small toy example -- auto-tested.
set.seed(1); n <- 30
x <- rnorm(n); y <- 0.5 * x + rnorm(n, sd = 0.3)
fit <- qqkrls(y, x,
              y_quantiles = c(0.25, 0.5),
              x_quantiles = c(0.5, 0.75),
              n_boot = 5, verbose = FALSE)
M <- qqkrls_to_matrix(fit, "coefficient")
print(M)
qqkrls_export(fit, tempfile(fileext = ".csv"))
}
