rbind.rwd_agg: Combine RiverWare data aggregators

View source: R/combine_rwd_agg.R

rbind.rwd_aggR Documentation

Combine RiverWare data aggregators

Description

Take a sequence of rwd_agg arguments (or vector, matrix, or data.frames) and combine by rows. If the objects are not rwd_agg objects they will be combined through the default rbind() method, and then verified that they meet all constraints to be a valid rwd_agg object. cbind() will fail for rwd_agg objects.

Usage

## S3 method for class 'rwd_agg'
rbind(..., deparse.level = 1)

## S3 method for class 'rwd_agg'
cbind(..., deparse.level = 1)

Arguments

...

(generalized) vectors or matrices. These can be given as named arguments. Other R objects may be coerced as appropriate, or S4 methods may be used: see sections ‘Details’ and ‘Value’. (For the "data.frame" method of cbind these can be further arguments to data.frame such as stringsAsFactors.)

deparse.level

integer controlling the construction of labels in the case of non-matrix-like arguments (for the default method):
deparse.level = 0 constructs no labels; the default,
deparse.level = 1 or 2 constructs labels from the argument names, see the ‘Value’ section below.

Examples


ra1 <- rwd_agg(data.frame(
  file = "KeySlots.rdf",
  slot = "Powell.Pool Elevation",
  period = "wy",
  summary = "min",
  eval = "<",
  t_s = 3550,
  variable = "powellLt3550",
  stringsAsFactors = FALSE
))

ra2 <- read_rwd_agg(
  system.file(
    "extdata/rwd_agg_files/passing_aggs.csv", 
    package = "RWDataPlyr"
  )
)

rbind(ra1, ra2)

## Not run: 
# will fail because you cannot have repeating variable names
rbind(ra1, ra1)

# will also fail
cbind(ra1, ra2)

## End(Not run)


BoulderCodeHub/RWDataPlyr documentation built on May 8, 2023, 3:55 a.m.