From f3f415520c89f9d8526bf6fadc862ebd44be220d Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 17 Nov 2016 18:14:32 +0100 Subject: Remove trailing whitespace, clean headers Also ignore test.R in the top level directory, as it is not meant to be public --- R/mkinresplot.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'R/mkinresplot.R') diff --git a/R/mkinresplot.R b/R/mkinresplot.R index 82ffd2cb..3650ef4b 100644 --- a/R/mkinresplot.R +++ b/R/mkinresplot.R @@ -17,16 +17,16 @@ # this program. If not, see if(getRversion() >= '2.15.1') utils::globalVariables(c("variable", "residual")) -mkinresplot <- function (object, +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)) if (length(obs_vars) > 0){ - obs_vars <- intersect(obs_vars_all, obs_vars) + obs_vars <- intersect(obs_vars_all, obs_vars) } else obs_vars <- obs_vars_all residuals <- subset(object$data, variable %in% obs_vars, residual) @@ -37,7 +37,7 @@ mkinresplot <- function (object, names(col_obs) <- names(pch_obs) <- obs_vars plot(0, type = "n", - xlab = xlab, ylab = ylab, + xlab = xlab, ylab = ylab, xlim = xlim, ylim = c(-1.2 * maxabs, 1.2 * maxabs), ...) @@ -49,7 +49,7 @@ mkinresplot <- function (object, abline(h = 0, lty = 2) if (legend == TRUE) { - legend(lpos, inset = c(0.05, 0.05), legend = obs_vars, + legend(lpos, inset = c(0.05, 0.05), legend = obs_vars, col = col_obs[obs_vars], pch = pch_obs[obs_vars]) } } -- cgit v1.2.1