aboutsummaryrefslogtreecommitdiff
path: root/R/mkinmod.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-10-19 15:52:16 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2015-10-19 15:52:16 +0200
commit8e709291eb56839b4b5a8f5bf712a53e3ece7d80 (patch)
tree96a501ed72106fe891d61445a367bd36ec5f4fcc /R/mkinmod.R
parent08cae49345c048fdbb69befc5a3b3f7966836223 (diff)
Add a print method for mkinmod objects
Diffstat (limited to 'R/mkinmod.R')
-rw-r--r--R/mkinmod.R16
1 files changed, 16 insertions, 0 deletions
diff --git a/R/mkinmod.R b/R/mkinmod.R
index 27716899..27b8410d 100644
--- a/R/mkinmod.R
+++ b/R/mkinmod.R
@@ -353,4 +353,20 @@ mkinmod <- function(..., use_of_ff = "min", speclist = NULL, quiet = FALSE, verb
class(model) <- "mkinmod"
return(model)
}
+
+print.mkinmod <- function(x, ...) {
+ cat("<mkinmod> model generated with\n")
+ cat("Use of formation fractions $use_of_ff:", x$use_of_ff, "\n")
+ cat("Specification $spec:\n")
+ for (obs in names(x$spec)) {
+ cat("$", obs, "\n", sep = "")
+ spl <- x$spec[[obs]]
+ cat("$type:", spl$type)
+ if (!is.null(spl$to)) cat(", $to: ", spl$to, ", $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")
+ if (!is.null(x$cf)) cat("Compiled model $cf available\n")
+}
# vim: set foldmethod=marker ts=2 sw=2 expandtab:

Contact - Imprint