ObservationList: ObservationList

Description Fields Methods

Description

ObservationList is a class for recording instances of observations. If a matrix is wide form, these observations are in long form.

Fields

aCellData

Variable which stores the column names of self$frame associated with each dimension of self$arr, but not defining them.

aDimData

Variable which stores the column names of self$frame associated with each dimension of self$arr, but not defining them.

aDims

Variable which stores the column names of self$frame defining each dimension of self$arr

aVal

Variable which stores the column names of self$frame defining the values of self$arr

aggregate

A function used to aggregate elements of self$frame when it is grouped. This function should take a single table as input, and summarize each relevant column when grouped.

arr

An array of aggregate data pulled from the frame. See formArray for details

cellData

A list of data associated to the cells of self$arr

cnames

The names of the rows of self$arr

colData

A list of data associated to the columns of self$arr

dimData

A list of data associated with each dimension of arr

dims

The dimensions of arr

dnames

The names of the slices of each dimension of self$arr

frame

The data frame this object is responsible for.

mat

A matrix pulled from a cross section of self$arr

ncol

The number of columns in self$arr

ndim

The number of dimensions of arr

nrow

The number of rows in self$arr

rnames

The names of the rows of self$arr

rowData

A list of data associated to the rows of self$arr

slice

Which slice of self$arr to look at for self$mat

Methods

formArray(...,val,dimData=list(),metaData=list(),cellData = list())

In order to use an ObservationList as an ArrayData, you need to select which columns to use to form the dimensions of the array. Optionally, you can also assign some of the columns to be associated with each dimension (or cell). Note that aggregate is used to determine how to deal with multiple frame associated with a particular grouping.

Arguments
... - Column names of columns which, in order should form the dimensions of the array
val - The attribute of frame to use for the values of the array (must aggregate_ to a numeric type)
dimData - A list containing for each dimension of the array, the attribute(s) of frame which are associated with that dimension.

initialize(data=data_frame(),...)

Create a new ObservationList with frame given by data

Arguments
data - A data frame to use as the frame of the ObservationList
... - A list of arguments to pass to the formArray function. These arguments determine how the ObservationList behaves as an ArrayData objec.

HopkinsIDD/ForecastFramework documentation built on May 28, 2019, 5:39 a.m.