From 12934520d7ec3218ce1505787b6066334a24a562 Mon Sep 17 00:00:00 2001 From: jranke Date: Tue, 30 Mar 2010 19:49:44 +0000 Subject: Initial import of the kinfit package developed from 2008-07 to 2010-03 at Harlan Laboratories Ltd (former RCC Ltd). Supports fitting of parent data with the usual FOCUS kinetic models. git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/kinfit@2 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- R/kinresplot.R | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 R/kinresplot.R (limited to 'R/kinresplot.R') diff --git a/R/kinresplot.R b/R/kinresplot.R new file mode 100644 index 0000000..be0a85d --- /dev/null +++ b/R/kinresplot.R @@ -0,0 +1,14 @@ +kinresplot <- function(kinobject, kinmodel, + xlab = "Time [days]", ylab = "Residual [% of applied radioactivity]", + maxabs = "auto") +{ + m <- kinobject$fits[[kinmodel]] + t <- m$model$t + residuals <- residuals(m) + if (maxabs == "auto") maxabs = max(abs(residuals)) + plot(t, residuals, + xlab = xlab, + ylab = ylab, + ylim = c( -1.2 * maxabs, 1.2 * maxabs)) + title(paste("Residuals of", kinmodel, "fit"), font.main = 1) +} -- cgit v1.2.1