Combines the rows of DTSg and other suitable objects.
Usage
# S3 method for class 'DTSg'
rowbind(x, ..., clone = getOption("DTSgClone"))Arguments
- x
A
DTSgobject (S3 method only).- ...
Any number of
DTSgobjects or objects coercible to one (seenewfor 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.
Value
Returns a DTSg object.
Examples
# 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()
#> Values:
#> .dateTime flow
#> <POSc> <num>
#> 1: 2007-01-01 9.540
#> 2: 2007-01-02 9.285
#> 3: 2007-01-03 8.940
#> 4: 2007-01-04 8.745
#> 5: 2007-01-05 8.490
#> ---
#> 2188: 2012-12-27 26.685
#> 2189: 2012-12-28 28.050
#> 2190: 2012-12-29 23.580
#> 2191: 2012-12-30 18.840
#> 2192: 2012-12-31 17.250
#>
#> Aggregated: FALSE
#> Regular: TRUE
#> Periodicity: Time difference of 1 days
#> Missing values: explicit
#> Time zone: UTC
#> Timestamps: 2192
## 'rbind()' is an R6 alias for 'rowbind()'
x$rbind(
list(flow[1001:1500, ], DTSg$new(values = flow[501:1000, ])),
flow[1501:.N, ]
)$print()
#> Values:
#> .dateTime flow
#> <POSc> <num>
#> 1: 2007-01-01 9.540
#> 2: 2007-01-02 9.285
#> 3: 2007-01-03 8.940
#> 4: 2007-01-04 8.745
#> 5: 2007-01-05 8.490
#> ---
#> 2188: 2012-12-27 26.685
#> 2189: 2012-12-28 28.050
#> 2190: 2012-12-29 23.580
#> 2191: 2012-12-30 18.840
#> 2192: 2012-12-31 17.250
#>
#> Aggregated: FALSE
#> Regular: TRUE
#> Periodicity: Time difference of 1 days
#> Missing values: explicit
#> Time zone: UTC
#> Timestamps: 2192
## S3 method
print(rowbind(
x = x,
list(flow[1001:1500, ], DTSg$new(values = flow[501:1000, ])),
flow[1501:.N, ]
))
#> Values:
#> .dateTime flow
#> <POSc> <num>
#> 1: 2007-01-01 9.540
#> 2: 2007-01-02 9.285
#> 3: 2007-01-03 8.940
#> 4: 2007-01-04 8.745
#> 5: 2007-01-05 8.490
#> ---
#> 2188: 2012-12-27 26.685
#> 2189: 2012-12-28 28.050
#> 2190: 2012-12-29 23.580
#> 2191: 2012-12-30 18.840
#> 2192: 2012-12-31 17.250
#>
#> Aggregated: FALSE
#> Regular: TRUE
#> Periodicity: Time difference of 1 days
#> Missing values: explicit
#> Time zone: UTC
#> Timestamps: 2192