From 6fd8b2a1ef16265f12d54bb182393bdeaada2db4 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 26 Jun 2014 08:11:49 +0200 Subject: Start new version, add xlim to mkinresplot --- ChangeLog | 16 ++++++++++------ DESCRIPTION | 4 ++-- R/mkinresplot.R | 5 +++-- man/mkinresplot.Rd | 4 ++++ 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ce73e5c..f80bc132 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,12 @@ +2014-06-26 Johannes Ranke for mkin (0.9-29) + + * R/mkinresplot.R: Make it possible to specify xlim + 2014-05-20 Johannes Ranke for mkin (0.9-28) * Do not backtransform confidence intervals for formation fractions if more - than one compound is formed, as such parameters only define the pathways - as a set + than one compound is formed, as such parameters only define the + pathways as a set * Add historical remarks and some background to the main package vignette * Correct 'isotropic' into 'isometric' for the ilr transformation @@ -25,10 +29,10 @@ * Split examples vignette to FOCUS_L and FOCUS_Z * Remove warning about constant formation fractions in mkinmod as it was based on a misconception - * Restrict the unit test with the Schaefer data to parent and primary - metabolites as formation fraction and DT50 for A2 are higly correlated and - passing the test is platform dependent. For example, the test fails in 1 - out of 14 platforms on CRAN as of today. + * Restrict the unit test with the Schaefer data to parent and primary + metabolites as formation fraction and DT50 for A2 are higly + correlated and passing the test is platform dependent. For example, + the test fails in 1 out of 14 platforms on CRAN as of today. * Add Eurofins Regulatory AG copyright notices * Import FME and deSolve instead of depending on them to have clean startup * Add a starter function for the GUI: gmkin() diff --git a/DESCRIPTION b/DESCRIPTION index 702d3604..1c2422f6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: mkin Type: Package Title: Routines for fitting kinetic models with one or more state variables to chemical degradation data -Version: 0.9-28 -Date: 2014-05-20 +Version: 0.9-29 +Date: 2014-06-26 Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "jranke@uni-bremen.de"), person("Katrin", "Lindenberger", role = "ctb"), diff --git a/R/mkinresplot.R b/R/mkinresplot.R index 07bd7dfa..c9a801fd 100644 --- a/R/mkinresplot.R +++ b/R/mkinresplot.R @@ -19,8 +19,9 @@ if(getRversion() >= '2.15.1') utils::globalVariables(c("variable", "residual")) mkinresplot <- function (object, obs_vars = names(object$mkinmod$map), + xlim = c(0, 1.1 * max(object$data$time)), xlab = "Time", ylab = "Residual", - maxabs = "auto", legend= TRUE, lpos = "topright", ...) + maxabs = "auto", legend= TRUE, lpos = "topright", ...) { obs_vars_all <- as.character(unique(object$data$variable)) @@ -36,7 +37,7 @@ mkinresplot <- function (object, names(col_obs) <- names(pch_obs) <- obs_vars plot(0, xlab = xlab, ylab = ylab, - xlim = c(0, 1.1 * max(object$data$time)), + xlim = xlim, ylim = c(-1.2 * maxabs, 1.2 * maxabs), ...) for(obs_var in obs_vars){ diff --git a/man/mkinresplot.Rd b/man/mkinresplot.Rd index 3f53dd1b..59d19274 100644 --- a/man/mkinresplot.Rd +++ b/man/mkinresplot.Rd @@ -12,6 +12,7 @@ \usage{ mkinresplot(object, obs_vars = names(object$mkinmod$map), + xlim = c(0, 1.1 * max(object$data$time)), xlab = "Time", ylab = "Residual", maxabs = "auto", legend = TRUE, lpos = "topright", ...) } @@ -23,6 +24,9 @@ A character vector of names of the observed variables for which residuals should be plotted. Defaults to all observed variables in the model } + \item{xlim}{ + plot range in x direction. + } \item{xlab}{ Label for the x axis. Defaults to "Time [days]". } -- cgit v1.2.1