Learn R Programming

ForecastFramework (version 0.10.3)

DataContainer: DataContainer

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

Arguments

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.

initialize(...)

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

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.

See Also

Is inherited by : MatrixData

Examples

Run this code
# NOT RUN {
SampleDataContainer <- R6Class(
  inherit= DataContainer,
  public = list(
    initialize = function(...){
      self$metaData = list(...)
    }
  )
)
data <- SampleDataContainer$new(letters[1:10],1:10)
data
data$metaData
# }

Run the code above in your browser using DataLab