namerows | R Documentation |
Add variable to data frame containing rownames
namerows(df, col.name = "id")
df |
data frame |
col.name |
name of new column containing rownames |
This is useful when the thing that you want to melt by is the rownames of the data frame, not an explicit variable
Hadley Wickham <h.wickham@gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.