[datatable-help] Preserving comments in [.data.table?

Allan Engelhardt (CYBAEA) allane at cybaea.com
Tue Sep 11 10:47:31 CEST 2012


I like comments, but [.data.table drops them, e.g.

DT1 <- data.table(A = 1:10)
comment(DT1$A) <- "Documenting A column"
DT2 <- DT1[A %% 2]
stopifnot(identical(comment(DT1$A), comment(DT2$A)))

Is there any way of preserving the comments? (My normal use case is DT1 
<- DT1[...] so copying from one to the other is a little ... tedious?)

Allan

-- 
http://www.cybaea.net/Blogs/Data/



More information about the datatable-help mailing list