RWDataPlyr (version 0.6.2)

rbind.rwd_agg: 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 rwd_agg
rbind(..., deparse.level = 1)

# S3 method for 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

Run this code
# NOT RUN {
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 <- rwd_agg(read.csv(
  system.file(
    "extdata/rwd_agg_files/passing_aggs.csv", 
    package = "RWDataPlyr"
  ), 
  stringsAsFactors = FALSE
))

rbind(ra1, ra2)

# }
# NOT RUN {
# will fail because you cannot have repeating variable names
rbind(ra1, ra1)

# will also fail
cbind(ra1, ra2)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab