DataContainer: DataContainer

Description Fields Methods See Also Examples

Description

A class for storing a matrix and relevant metaData. This class is the starting point for all of the Data oriented classes. However, its not really useful on its own, and serves mostly as a placeholder generic class in case we want to implement a drastically different type of model. This class should only need to be extended in the case where we implement something outside the scope of MatrixDataContainer

Fields

metaData

Any data not part of the main data structure.

Methods

debug(string)

A function for debugging the methods of this class. It calls the browser command. In order for methods to opt into to debugging, they need to implement the following code at the beginning: if(<method_name> %in% private$.debug){browser()}. This method exists, because the debugger is not always intuitive when it comes to debugging R6 methods.

Arguments
string - The name(s) of methods to debug as a character vector

initialize(...)

This function should be extended. Create a new instance of this class.

Arguments
... - This function should take in any arguments just in case.

undebug(string)

A function for ceasing to debug methods. Normally a method will call the browser command every time it is run. This command will stop it from doing so.

Arguments
string - The name(s) of the methods to stop debugging.

See Also

Is inherited by : MatrixData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
SampleDataContainer <- R6Class(
  inherit= DataContainer,
  public = list(
    initialize = function(...){
      self$metaData = list(...)
    }
  )
)
data <- SampleDataContainer$new(letters[1:10],1:10)
data
data$metaData

HopkinsIDD/ForecastFramework documentation built on Nov. 10, 2019, 2:15 a.m.