Skip to contents

This function reliably returns integer names if present, otherwise character dimnames. Use this instead of colnames() if you need guaranteed dispatch.

Usage

col_names(x)

# Default S3 method
col_names(x)

# S3 method for class 'matrix_int_names'
col_names(x)

col_names(x) <- value

# Default S3 method
col_names(x) <- value

# S3 method for class 'matrix_int_names'
col_names(x) <- value

Arguments

x

A matrix_int_names object

value

a vector of integer or character column names to set, replacing the current one.

Value

Integer or character vector of column names, or NULL