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