Open goldingn opened 7 years ago
E.g. something like this:
cl <- Carolina_Wren_Workflow$call.list
names <- c('occurrence', 'covariate', 'process', 'model', 'output')
for (i in 1:5) {
cat(sprintf('%s:\n', names[i]))
module_list <- cl[[i]]
for (j in seq_along(module_list)) {
module <- module_list[[j]]
if (isTRUE(all.equal(module$paras, list()))) {
cat(sprintf('\t%s', module$module))
} else {
args <- paste(names(module$paras), module$paras, sep = ' = ')
cat(sprintf('\t%s(%s)',
module$module,
paste(args, collapse = ', ')))
}
cat('\n')
}
}
occurrence:
CarolinaWrenPO
covariate:
CarolinaWrenRasters
process:
Background(n = 100)
model:
LogisticRegression
output:
PrintMap
but handling chains, lists, unnamed arguments etc.
Looks good to me. It think we want print to return something short and simple as plot and summary do more extensive stuff. what you suggest does this nicely
Posting for @lizhmartin. The default print method for
zoonWorkflow
objects is kind of icky:Some formatting of the call would be helpful, or better yet a more structured list of the modules used