R: Rename select rows of a dataframe

rerowname {caroline} | R Documentation

## Rename select rows of a dataframe

### Description

Used to easily rename the rows of a dataframe.

### Usage

    rerowname(df, old='NA', new='unknown')

### Arguments

`df` | A dataframe with rownames.
`old` | The row name to be replaced.
`new` | The replacment row name.

### Value

A dataframe with one new rowname

### Examples

    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)

[Package caroline version 0.7.6 Index]