Aggregate Values Row-wise
Applies one or more provided summary functions row-wise to selected columns
of a DTSg object.
## S3 method for class 'DTSg'
rowaggregate(
  x,
  resultCols,
  fun,
  ...,
  cols = self$cols(class = "numeric"),
  clone = getOption("DTSgClone")
)x | 
 A   | 
resultCols | 
 A character vector either of length one (names of
  | 
fun | 
 A summary function, (named)   | 
... | 
 Further arguments passed on to   | 
cols | 
 A character vector specifying the columns to apply   | 
clone | 
 A logical specifying if the object is modified in place or if a clone (copy) is made beforehand.  | 
Some examples for fun are as follows:
A list or character vector must have names in case more than one summary function is provided.
Returns a DTSg object.
# new DTSg object DT <- data.table::data.table( date = flow$date, flow1 = flow$flow - rnorm(nrow(flow)), flow2 = flow$flow, flow3 = flow$flow + rnorm(nrow(flow)) ) x <- DTSg$new(values = DT) # mean and standard deviation of multiple measurements per timestamp ## R6 method x$rowaggregate(resultCols = "flow", fun = list(mean = mean, sd = sd)) ## S3 method rowaggregate(x = x, resultCols = "flow", fun = list(mean = mean, sd = sd))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.