AppendRowNames.Rd
Append rownames to a data.frame as first column.
AppendRowNames(x, names = "rownames", after = 0, remove_rownames = TRUE)
the object x with appended rownames
(dd <- data.frame(x=1:5, y=6:10, z=LETTERS[1:5],
row.names = letters[1:5]))
#> x y z
#> a 1 6 A
#> b 2 7 B
#> c 3 8 C
#> d 4 9 D
#> e 5 10 E
AppendRowNames(dd)
#> rownames x y z
#> 1 a 1 6 A
#> 2 b 2 7 B
#> 3 c 3 8 C
#> 4 d 4 9 D
#> 5 e 5 10 E