powered by
Used to easily rename the rows of a dataframe.
rerowname(df, old='NA', new='unknown')
A dataframe with one new rowname
A dataframe with rownames.
The row name to be replaced.
The replacment row name.
df <- data.frame(a=c(1,2,3), b=c('x','y','z'), c=c(5,3,2)) rownames(df) <- c('p','q','NA') rerowname(df)
Run the code above in your browser using DataLab