R/get_log.trollsim.R

#' @include trollsim.R
#' @import methods
NULL

#' Extract simulation log
#'
#' `get_forest()` extract the simulation log `TROLL` outputs.
#'
#' @param sim trollsim or trollstack.
#' @param ... unused argument.
#'
#' @return the log in the console
#'
#' @seealso [trollsim()], [trollstack()], [troll()], [stack()]
#'
#' @examples
#'
#' data("TROLLv3_output")
#' get_log(TROLLv3_output)
#'
#' @name get_log
NULL

#' @rdname get_log
#' @export
setGeneric("get_log", function(sim, ...) {
  return(standardGeneric("get_log"))
})

#' @rdname get_log
#' @export
setMethod("get_log", "trollsim", function(sim, ...) {
  cat(sim@log)
})

Try the rcontroll package in your browser

Any scripts or data that you put into this service are public.

rcontroll documentation built on Sept. 30, 2024, 9:13 a.m.