I want to rank a variable in groups of two other variables. For that, I am applying frank() in data.table.
structure(list(indpn = c(170, 170, 170, 170, 170, 170, 9870,
9870, 9870, 9870, 9870, 9870), occpn = c(6050, 9130, 205, 5120,
5740, 6005, 3930, 700, 1410, 3645, 1050, 150), ncwc = c(258575,
4747, 10742, 205, 867, 11026, 0, 0, 0, 0, 0, 0)), row.names = c(NA,
-12L), class = c("data.table", "data.frame"), .internal.selfref = <pointer: 0x0000000000181ef0>)