R/model_statements.R

Defines functions ModelStatements

Documented in ModelStatements

#_______________________________________________________________________________
#----                       model_statements class                          ----
#_______________________________________________________________________________

#' 
#' Model statements class. A list of statements.
#' 
#' @export
setClass(
  "model_statements",
  representation(
  ),
  contains = "pmx_list",
  prototype = prototype(type="model_statement"),
  validity = function(object) {
    return(TRUE)
  }
)

#' 
#' Create an empty list of model statements.
#' 
#' @return a model statements object
#' @export
ModelStatements <- function() {
  return(new("model_statements"))
}

#_______________________________________________________________________________
#----                                  show                                 ----
#_______________________________________________________________________________


setMethod("show", signature=c("model_statements"), definition=function(object) {
  for (statement in object@list) {
    show(statement)
    cat("\n")
  }
})

Try the campsismod package in your browser

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

campsismod documentation built on Oct. 12, 2023, 5:13 p.m.