merge.DTSg: Merge two objects

merge.DTSgR Documentation

Merge two objects

Description

Joins two DTSg objects based on their .dateTime column. Their time zones and aggregated fields must match.

Usage

## S3 method for class 'DTSg'
merge(x, y, ..., clone = getOption("DTSgClone"))

Arguments

x

A DTSg object (S3 method only).

y

A DTSg object or an object coercible to one. See new for further information.

...

Further arguments passed on to data.table::merge. As the by, by.x and by.y arguments can endanger the object's integrity, they are rejected.

clone

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

Value

Returns a DTSg object.

See Also

getOption

Examples

# new DTSg object
x <- DTSg$new(values = flow)

# merge with 'data.table'
## R6 method
x$merge(
  y = flow,
  suffixes = c("_1", "_2")
)$print()

## S3 method
print(merge(
  x = x,
  y = flow,
  suffixes = c("_1", "_2")
))


DTSg documentation built on Sept. 28, 2023, 1:06 a.m.