Description
Add variable to data frame containing rownames
Usage
namerows(df, col.name = "id")
Author
Hadley Wickham <h.wickham@gmail.com>
Arguments
- df
data frame
- col.name
name of new column containing rownames
Details
This is useful when the thing that you want to melt by is the rownames
of the data frame, not an explicit variable