From 2dc4f2f87048c28252992fe70055e0d7652a61ef Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 29 Aug 2014 12:33:26 +0200 Subject: Avoid an unnecessary warning --- NEWS.md | 8 ++++---- R/plot.mkinfit.R | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index 1ed94c97..0d690b37 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,10 +12,10 @@ - `mkinfit()`: The initial value (state.ini) for the parent compound was not set when the parent was not the (only) variable with the highest value in the observed data. -- `mkinerrmin()`: When checking for degrees of freedom for metabolites, check - if their time zero value is fixed instead of checking if the observed value - is zero. This ensures correct calculation of degrees of freedom also in cases - where the metabolite residue at time zero is greater zero. +- `mkinerrmin()`: When checking for degrees of freedom for metabolites, check if their time zero value is fixed instead of checking if the observed value is zero. This ensures correct calculation of degrees of freedom also in cases where the metabolite residue at time zero is greater zero. + +- `plot.mkinfit()`: Avoid a warning message about only using the first component of ylim that occurred when ylim was specified explicitly + ## MINOR CHANGES diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R index 4132d96c..31746fb8 100644 --- a/R/plot.mkinfit.R +++ b/R/plot.mkinfit.R @@ -31,7 +31,7 @@ plot.mkinfit <- function(x, fit = x, { if (add && show_residuals) stop("If adding to an existing plot we can not show residuals") - if (ylim == "default") { + if (ylim[[1]] == "default") { ylim = c(0, max(subset(fit$data, variable %in% obs_vars)$observed, na.rm = TRUE)) } -- cgit v1.2.1