You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The column names of a merge() result can be monstrous if raw, unnamed objects are passed to merge(). This can occur when merge() is called via do.call(). For example:
data(sample_matrix)
x<- as.xts(sample_matrix)
d<- setNames(lapply(head(x, 2), function(x) { dimnames(x) <-NULL; x }), NULL)
# cbind.xts() calls merge.xts()
do.call(cbind, d)
c.50.0397819115463..50.2304961977954.2007-01-0250.039782007-01-0350.23050c.50.1177772350145..50.421876002125.2007-01-0250.117782007-01-0350.42188c.49.9504146442813..50.2304961977954.2007-01-0249.950412007-01-0350.23050c.50.1177772350145..50.3976663383861.2007-01-0250.117782007-01-0350.39767# zoo is similar
do.call(cbind, lapply(d, as.zoo))
structure(c(50.0397819115463, 50.2304961977954), .Dim= c(2L,
2007-01-0250.039782007-01-0350.23050
structure(c(50.1177772350145, 50.421876002125), .Dim= c(2L,
2007-01-0250.117782007-01-0350.42188
structure(c(49.9504146442813, 50.2304961977954), .Dim= c(2L,
2007-01-0249.950412007-01-0350.23050
structure(c(50.1177772350145, 50.3976663383861), .Dim= c(2L,
2007-01-0250.117782007-01-0350.39767# matrix is a little nicer
do.call(cbind, lapply(d, as.matrix))
X[[i]] X[[i]] X[[i]] X[[i]]
2007-01-0250.0397850.1177849.9504150.117782007-01-0350.2305050.4218850.2305050.39767
The text was updated successfully, but these errors were encountered:
We called as.character(dots) for all objects passed to merge(), even
if we had symbol names. This was incredibly expensive for large
objects.
Now we only call as.character() on the subset of dots that do not have
symbol names. This means we will often not call as.character() at all.
See #248.
The column names of a
merge()
result can be monstrous if raw, unnamed objects are passed tomerge()
. This can occur whenmerge()
is called viado.call()
. For example:The text was updated successfully, but these errors were encountered: