diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2015-10-19 15:52:55 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2015-10-19 15:53:37 +0200 |
commit | 76084872526d7c6fc6a48e893c8240b323d61a87 (patch) | |
tree | d49898118d722e228ed8b7d7ed907bff1a7a6ba0 /R/plot.mkinfit.R | |
parent | 8e709291eb56839b4b5a8f5bf712a53e3ece7d80 (diff) |
Make plot.mkinfit work with models where full_name components are NULL
Diffstat (limited to 'R/plot.mkinfit.R')
-rw-r--r-- | R/plot.mkinfit.R | 2 |
1 files changed, 2 insertions, 0 deletions
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]) |