Is there any best option to select all row except the first row in each group. I am using head() to select the first row in each group but have a situation where I need to output data except the first row in each group.
I prefer options using data.table package.
setDT(mtcars)
mtcars[order(cyl,mpg), head(.SD,2), by=.(cyl)]