% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adjointDiscrete.R
\name{rxSolveAdjointRk4}
\alias{rxSolveAdjointRk4}
\title{Solve a model with an in-engine discrete-adjoint (\code{s}) method}
\usage{
rxSolveAdjointRk4(
  object,
  events,
  params = NULL,
  calcSens,
  method = "rk4s",
  ...
)
}
\arguments{
\item{object}{model definition accepted by \code{\link[=rxode2]{rxode2()}}.}

\item{events}{an rxode2 event table / data set.}

\item{params}{optional named parameter vector or data frame (per subject).}

\item{calcSens}{character vector of parameters to differentiate w.r.t.}

\item{method}{adjoint solve method (default \code{"rk4s"}).  May be a composite
(\code{"dop853s+ros4s"}).}

\item{...}{passed to \code{\link[=rxSolve]{rxSolve()}}.}
}
\value{
the solved data frame with \verb{rx__sens_<state>_BY_<param>__} columns.
}
\description{
Applies the (cached) adjoint expansion, solves with the requested adjoint
method, and drops the internal \verb{rx__adj*} lhs, returning the full-trajectory
\verb{rx__sens_<state>_BY_<param>__} columns.  The stiff analytic Jacobian is
emitted into the expansion automatically, inferred from \code{method}.
}
\author{
Matthew L. Fidler
}
