powered by
Append rownames to a data.frame as first column.
AppendRowNames(x, names = "rownames", after = 0, remove_rownames = TRUE)
the object x with appended rownames
a data.frame
the name of the new inserted column containing the rownames.
a subscript, after which the values are to be appended. If missing the rownames will be inserted as first column.
logical defining if the existing rownames should be removed. Default is TRUE.
TRUE
Andri Signorell <andri@signorell.net>
Append
(dd <- data.frame(x=1:5, y=6:10, z=LETTERS[1:5], row.names = letters[1:5])) AppendRowNames(dd)
Run the code above in your browser using DataLab