From c9667fbfd5a8c9601ac0c977776b12fe7d9b19dd Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 10 Dec 2015 11:24:16 +0100 Subject: Improve print method for mkinmod --- R/mkinmod.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'R') diff --git a/R/mkinmod.R b/R/mkinmod.R index c70f1260..5ec62bbe 100644 --- a/R/mkinmod.R +++ b/R/mkinmod.R @@ -363,8 +363,9 @@ print.mkinmod <- function(x, ...) { cat("$", obs, "\n", sep = "") spl <- x$spec[[obs]] cat("$type:", spl$type) - if (!is.null(spl$to)) cat(", $to: ", paste(spl$to, collapse = ", "), ", $sink: ", spl$sink, sep = "") - if (!is.null(spl$full_name)) if (!is.na(spl$full_name)) cat(", $full_name:", spl$full_name) + if (!is.null(spl$to) && length(spl$to)) cat("; $to: ", paste(spl$to, collapse = ", "), sep = "") + cat("; $sink: ", spl$sink, sep = "") + if (!is.null(spl$full_name)) if (!is.na(spl$full_name)) cat("; $full_name:", spl$full_name) cat("\n") } if (is.matrix(x$coefmat)) cat("Coefficient matrix $coefmat available\n") -- cgit v1.2.1