Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shorten column names for merge on unnamed objects
The column names of a merge() result can be monstrous for raw, unnamed numeric objects. Something similar to dput() for the entire column is used, but zoo deparses the dput() output and limits the deparse length to ~60 characters. Use a modified version of makeNames() (defined in merge.zoo()) to make the column names. Major differences are: - Use substitute(alist(...)) to avoid evaluating '...' - Use deparse(x, nlines = 1L) to deparse only the first expression NOTE: this may break existing code that relies on behavior for integer objects. For example, current behavior is: x <- .xts(1:5, 1:5) lx <- list(x, x) do.call(merge, lx) X1.5 X1.5.1 1969-12-31 18:00:01 1 1 1969-12-31 18:00:02 2 2 1969-12-31 18:00:03 3 3 1969-12-31 18:00:04 4 4 1969-12-31 18:00:05 5 5 New behavior has column names: structure.1.5...Dim...c.5L..1L...index...structure.1.5..tclass...c..POSIXct... structure.1.5...Dim...c.5L..1L...index...structure.1.5..tclass...c.. POSIXct....1 Fixes #248. See #259.
- Loading branch information