Learn R Programming

DTSg (version 0.6.0)

merge.DTSg: Merge Two DTSg Objects

Description

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

Usage

# S3 method for 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 merge. As the by, by.x and by.y arguments can endanger the integrity of the object, they are rejected.

clone

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

Value

Returns a DTSg object.

See Also

DTSg, new, merge

Examples

Run this code
# NOT RUN {
# new DTSg object
x <- DTSg$new(values = flow)

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

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

# }

Run the code above in your browser using DataLab