use nrow to rename row index code example Example: how to change the numbering of rows in r rownames(dfr) <- 1:nrow(dfr)