R/mutators.R

Defines functions length.TimeIntervals labels.TimeIntervals labels.TimeSeries

# MUTATORS
#' @include AllGenerics.R
NULL

# Getters ======================================================================
#' @export
#' @method labels TimeSeries
labels.TimeSeries <- function(object, ...) colnames(object)

#' @rdname labels
#' @aliases labels,TimeSeries-method
setMethod("labels", "TimeSeries", labels.TimeSeries)

#' @export
#' @method labels TimeIntervals
labels.TimeIntervals <- function(object, ...) object@.Id

#' @rdname labels
#' @aliases labels,TimeIntervals-method
setMethod("labels", "TimeIntervals", labels.TimeIntervals)

#' @export
#' @method length TimeIntervals
length.TimeIntervals <- function(x) length(x@.Id)

#' @rdname length
#' @aliases length,TimeIntervals-method
setMethod("length", "TimeIntervals", length.TimeIntervals)

Try the aion package in your browser

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

aion documentation built on Oct. 4, 2024, 5:07 p.m.