setColnames {FastUtils}R Documentation

Set Column Names

Description

This function sets new column names for a given data frame or matrix.

Usage

setColnames(object, newColnames)

Arguments

object

A data frame or matrix.

newColnames

A character vector specifying the new column names.

Value

The data frame or matrix with updated column names.

Examples

# Set new column names for a data frame
df <- data.frame(A = c(1, 2, 3), B = c(4, 5, 6))
setColnames(df, c("X", "Y"))

[Package FastUtils version 0.1.1 Index]