Group by Count

data4_dt[, ':=' (COUNT = .N, temp = "justTest" ) , by = job_id]



Order By

data4_dt[order(-COUNT), ]



Delete Column

data4_dt$cnt <- NULL

data4_dt[ , cnt := NULL]

data4_dt

반응형
Posted by JoeSung
,