OpasnetUtils/Print: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 12: | Line 12: | ||
label="Initiate functions" | label="Initiate functions" | ||
graphics="1" | graphics="1" | ||
showcode="1" | |||
> | > | ||
# SETMETHOD PRINT ######################## print ovariable contents | # SETMETHOD PRINT ######################## print ovariable contents | ||
Revision as of 10:52, 15 June 2012
| Moderator:Nobody (see all) Click here to sign up. |
| This page is a stub. You may improve it into a full page. |
| Upload data
|
Description
Print ovariable contents
Code
# SETMETHOD PRINT ######################## print ovariable contents
temp <- setMethod(
f = "print",
signature = signature(x = "oassessment"),
definition = function(x) {
cat("Dependencies\n")
print(xtable(x@dependencies), type = 'html')
cat("Decisions\n")
print(xtable(x@decisions), type = 'html')
cat("Stakeholders\n")
print(xtable(x@stakeholders), type = 'html')
cat("Probabilities\n")
print(xtable(x@probabilities), type = 'html')
cat("\n\nThe list of variables in this assessment.\n")
for(k in 1:length(x@vars)) {
cat("<b>Variable", names(x@vars)[k], "</b> <p>\n\n")
print(x@vars[[k]])
}
}
)
temp <- setMethod(
f = "print",
signature = signature(x = "ovariable"),
definition = function(x, iter = 1) {
cat("<b>Ovariable", x@name, "</b>\n")
cat("Output\n")
print(xtable(x@output[x@output$Iter %in% iter, ]), type = 'html')
cat("Formula\n")
print(x@formula)
cat("Dependencies\n")
print(x@dependencies)
}
)
|