Skip to content

Commit

Permalink
add summary to MWController object
Browse files Browse the repository at this point in the history
  • Loading branch information
TitouanRobert committed Aug 11, 2017
1 parent a7cd48d commit 3e4a896
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method(summary,MWController)
export(combineWidgets)
export(combineWidgetsOutput)
export(compareOptions)
Expand Down
17 changes: 17 additions & 0 deletions R/controller.R
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,20 @@ knit_print.MWController <- function(x, ...) {
x$init()
knitr::knit_print(x$returnCharts(), ...)
}

#' summary method for MWController object
#'
#' @param object MWController object
#' @param ... Not use
#'
#' @export
summary.MWController <- function(object, ...) {
cat("List of inputs : \n\n")
sapply(names(object$inputList$inputs), function(X){
cat(paste0("Input : ", X, "\n"))
})
cat(paste0("\nNumber of chart(s) : ", object$ncharts, "\n"))
cat(paste0("Number of row(s) : ", object$nrow, "\n"))
cat(paste0("Number of column(s) : ", object$ncol, "\n"))
}

16 changes: 16 additions & 0 deletions man/summary.MWController.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e4a896

Please sign in to comment.