Learn R Programming

ospsuite.utils (version 1.2.0)

Printable: Printable

Description

Base class that implements some basic properties for printing to console.

Arguments

Methods

Public methods

Method clone()

The objects of this class are cloneable with this method.

Usage

Printable$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# NOT RUN {
myPrintable <- R6::R6Class(
  "myPrintable",
  inherit = Printable,
  public = list(
    x = NULL,
    y = NULL,
    print = function() {
      private$printClass()
      private$printLine("x", self$x)
      private$printLine("y", self$y)
      invisible(self)
    }
  )
)

x <- myPrintable$new()
x
# }

Run the code above in your browser using DataLab