xtsbind: Binds xts columns from two or more xts matrices.

Description Usage Arguments Details Value

Description

Similar to cbind, this function binds xts matrices column-wise. If the xts matrices do not have the same number of rows, it will appropriately pad with NAs. In addition, it binds on date (not time), so if the prices are sampled at different times, then the times are ignored for proper binding.

Usage

1
xtsbind(X_x, ...)

Arguments

...

Additional xts matrices to bind.

x

First xts matrix to bind.

Details

In addition, column names are as is without substitution of special characters by periods. This is particularly useful when binding xts matrices of features generated using make_features2 (where we want to keep the operators + - * / and the delay operator ; in the column names.

Note however that column names are extracted from the first element of each expression without further manipulation. Therefore, xtsbind(x, y+2) will have columns names of x and y. Similarly, xtsbind(x, x+y) will have columns names of x and x, where the second x has .1 appended as would normally be the case for a cbind statement.

Value

Returns an xts matrix that cbinds all matrices provided as arguments, padded with NAs as needed, subject to the column names exceptions as detailed above.


jeanmarcgp/xtsanalytics documentation built on May 19, 2019, 12:38 a.m.