aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2012-11-26 23:03:19 +0000
committerjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2012-11-26 23:03:19 +0000
commitdf916b91c90f80e2c68f3e136a7b6e07b8c6bae1 (patch)
tree4b54b46c68a0b5866aa6bf15131b55b34668af08 /man
parentd267b8c116f78ee9b7b4d76c9ddb7b8950a127b4 (diff)
- Added an S3 plot method for mkinfit models
- Fixed a bug in the mkinfit summary method which crashed on missing covariance matrices git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@58 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'man')
-rw-r--r--man/mkinplot.Rd34
-rw-r--r--man/plot.mkinfit.Rd70
2 files changed, 73 insertions, 31 deletions
diff --git a/man/mkinplot.Rd b/man/mkinplot.Rd
index b72675a..4b0fef4 100644
--- a/man/mkinplot.Rd
+++ b/man/mkinplot.Rd
@@ -4,50 +4,22 @@
Plot the observed data and the fitted model of an mkinfit.
}
\description{
- Solves the differential equations with the optimised and fixed parameters
- from a previous successful call to \code{\link{mkinfit}} and plots
- the observed data together with the numerical solution of the fitted model.
+ Deprecated function. It now only calls the plot method \code{\link{plot.mkinfit}}.
}
\usage{
- mkinplot(fit, xlab = "Time", ylab = "Observed",
- xlim = range(fit$data$time), ylim = range(fit$data$observed, na.rm=TRUE),
- legend = TRUE, ...)
+ mkinplot(fit, ...)
}
\arguments{
\item{fit}{
an object of class \code{\link{mkinfit}}.
}
- \item{xlab}{
- label for the x axis.
- }
- \item{ylab}{
- label for the y axis.
- }
- \item{xlim}{
- plot range in x direction.
- }
- \item{ylim}{
- plot range in y direction.
- }
- \item{legend}{
- legend specifying if a legend should be included in the plot.
- }
\item{\dots}{
- further arguments passed to \code{\link{plot}}.
+ further arguments passed to \code{\link{plot.mkinfit}}.
}
}
\value{
The function is called for its side effect.
}
-\examples{
-# One parent compound, one metabolite, both single first order.
-SFO_SFO <- mkinmod(
- parent = list(type = "SFO", to = "m1", sink = TRUE),
- m1 = list(type = "SFO"))
-# Fit the model to the FOCUS example dataset D using defaults
-fit <- mkinfit(SFO_SFO, FOCUS_2006_D)
-\dontrun{mkinplot(fit)}
-}
\author{
Johannes Ranke
}
diff --git a/man/plot.mkinfit.Rd b/man/plot.mkinfit.Rd
new file mode 100644
index 0000000..01b8cec
--- /dev/null
+++ b/man/plot.mkinfit.Rd
@@ -0,0 +1,70 @@
+\name{plot.mkinfit}
+\alias{plot.mkinfit}
+\title{
+ Plot the observed data and the fitted model of an mkinfit object.
+}
+\description{
+ Solves the differential equations with the optimised and fixed parameters
+ from a previous successful call to \code{\link{mkinfit}} and plots
+ the observed data together with the numerical solution of the fitted model.
+}
+\usage{
+\method{plot}{mkinfit}(x, fit = x, xlab = "Time", ylab = "Observed",
+ xlim = range(fit$data$time), ylim = range(fit$data$observed, na.rm = TRUE),
+ col_obs = 1:length(fit$mkinmod$map), pch_obs = col_obs, lty_obs = 1,
+ add = FALSE, legend = !add, ...)
+}
+\arguments{
+ \item{x}{
+ Alias for fit introduced for compatibility with the generic S3 method.
+}
+ \item{fit}{
+ an object of class \code{\link{mkinfit}}.
+}
+ \item{xlab}{
+ label for the x axis.
+ }
+ \item{ylab}{
+ label for the y axis.
+ }
+ \item{xlim}{
+ plot range in x direction.
+ }
+ \item{ylim}{
+ plot range in y direction.
+ }
+ \item{col_obs}{
+ colors used for plotting the observed data and the corresponding model prediction lines.
+}
+ \item{pch_obs}{
+ symbols to be used for plotting the data.
+}
+ \item{lty_obs}{
+ line types to be used for the model predictions.
+}
+ \item{add}{
+ should the plot be added to an existing plot?
+}
+ \item{legend}{
+ should a legend be added to the plot?
+}
+ \item{\dots}{
+ further arguments passed to \code{\link{plot}}.
+}
+}
+\value{
+ The function is called for its side effect.
+}
+\examples{
+# One parent compound, one metabolite, both single first order.
+SFO_SFO <- mkinmod(
+ parent = list(type = "SFO", to = "m1", sink = TRUE),
+ m1 = list(type = "SFO"))
+# Fit the model to the FOCUS example dataset D using defaults
+fit <- mkinfit(SFO_SFO, FOCUS_2006_D)
+\dontrun{plot(fit)}
+}
+\author{
+ Johannes Ranke
+}
+\keyword{ hplot }

Contact - Imprint