Saving plots in a data.table list column

后端 未结 1 1224
逝去的感伤
逝去的感伤 2021-01-17 10:53

When I run...

library(data.table)
DT = CJ(id = 1, id2 = 1:3)[, .(
    d = as.IDate(\"2017-01-01\")+1:10, v = id*10 + id2*1:10
), by=.(id, id2)]

plotDT = DT[         


        
相关标签:
1条回答
  • 2021-01-17 10:58

    One working hack is to write j like

    with(copy(.SD), {yada yada})
    

    or similar, which ensures that references are to the per-group copy of .SD and don't get conflated.

    0 讨论(0)
提交回复
热议问题