Set the Row Names and Column Names in an Object

Share:

Description

This is a convenience function that sets the row names and column names on an object and returns the object.

Usage

1
2
SetRowNames(object = nm, nm)
SetColNames(object = nm, nm)

Arguments

object

an object for which a names attribute will be meaningful

nm

a character vector of names to assign to the object

Value

An object of the same sort as object with the new names assigned.

Author(s)

Andri Signorell <andri@signorell.net>
but it is merely a copy of setNames extended for rows and columns

See Also

setNames

Examples

1
2
tab <- table(d.pizza$driver, d.pizza$wine_delivered)
SetRowNames(BinomCI(tab[,1], rowSums(tab)), rownames(tab))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.