When I try to use row_number()out dplyron data.table table, it gives an error. Here is an example:
library(dplyr)
library(data.table)
mine <- data.table(a = 1:10)
mine %>% mutate(row_number())
# Error in rank(x, ties.method = "first", na.last = "keep") :
# argument "x" is missing, with no default
Any ideas why this is happening?
source
share