setRownames {FastUtils} | R Documentation |
Set Row Names
Description
This function sets new row names for a given data frame or matrix.
Usage
setRownames(object, newRownames)
Arguments
object |
A data frame or matrix. |
newRownames |
A character vector specifying the new row names. |
Value
The data frame or matrix with updated row names.
Examples
# Set new row names for a data frame
df <- data.frame(A = c(1, 2, 3), B = c(4, 5, 6))
setRownames(df, c("row1", "row2", "row3"))
[Package FastUtils version 0.1.1 Index]