From 76084872526d7c6fc6a48e893c8240b323d61a87 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 19 Oct 2015 15:52:55 +0200 Subject: Make plot.mkinfit work with models where full_name components are NULL --- R/plot.mkinfit.R | 2 ++ 1 file changed, 2 insertions(+) (limited to 'R/plot.mkinfit.R') diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R index f8ee600e..6ca7e531 100644 --- a/R/plot.mkinfit.R +++ b/R/plot.mkinfit.R @@ -77,8 +77,10 @@ plot.mkinfit <- function(x, fit = x, matlines(out$time, out[obs_vars], col = col_obs[obs_vars], lty = lty_obs[obs_vars]) if (legend == TRUE) { legend_names = lapply(names(fit$mkinmod$spec), function(x) { + if (!is.null(fit$mkinmod$spec[[x]]$full_name)) if (is.na(fit$mkinmod$spec[[x]]$full_name)) x else fit$mkinmod$spec[[x]]$full_name + else x }) legend(lpos, inset= inset, legend = legend_names, col = col_obs[obs_vars], pch = pch_obs[obs_vars], lty = lty_obs[obs_vars]) -- cgit v1.2.1