rerowname: Rename select rows of a dataframe

View source: R/convert.R

rerownameR 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)


caroline documentation built on Nov. 9, 2023, 9:07 a.m.

Related to rerowname in caroline...