Learn R Programming

DTSg (version 2.0.0)

rowbind.DTSg: Combine rows

Description

Combines the rows of DTSg and other suitable objects.

Usage

# S3 method for DTSg
rowbind(x, ..., clone = getOption("DTSgClone"))

Value

Returns a DTSg object.

Arguments

x

A DTSg object (S3 method only).

...

Any number of DTSg objects or objects coercible to one (see new for further information). lists of such objects or a mixture of lists and non-lists are also accepted.

clone

A logical specifying if the object shall be modified in place or if a deep clone (copy) shall be made beforehand.

See Also

cols, getOption

Examples

Run this code
# new DTSg object
x <- DTSg$new(values = flow[1:500, ])

# combine rows
## R6 method
x$rowbind(
  list(flow[1001:1500, ], DTSg$new(values = flow[501:1000, ])),
  flow[1501:.N, ]
)$print()

## 'rbind()' is a "hidden" R6 alias for 'rowbind()'
x$rbind(
  list(flow[1001:1500, ], DTSg$new(values = flow[501:1000, ])),
  flow[1501:.N, ]
)$print()

## S3 method
print(rowbind(
  x = x,
  list(flow[1001:1500, ], DTSg$new(values = flow[501:1000, ])),
  flow[1501:.N, ]
))

Run the code above in your browser using DataLab