dimnames.exdf: Retrieve or set the dimension names of an exdf object

View source: R/exdf.R

dimnames.exdfR Documentation

Retrieve or set the dimension names of an exdf object

Description

Returns or sets the dimension names of an exdf object's main_data. When setting names, the column names of the exdf object's units and categories are also set. Also enables colnames and rownames for exdf objects.

Usage

  ## S3 method for class 'exdf'
dimnames(x)

  ## S3 replacement method for class 'exdf'
dimnames(x) <- value

Arguments

x

An exdf object.

value

A possible value for dimnames(x)

Value

Returns dimnames(x[['main_data']]).

See Also

exdf

Examples

simple_exdf <- exdf(data.frame(A = 1), data.frame(A = 'u'), data.frame(A = 'c'))

dimnames(simple_exdf)
dimnames(simple_exdf[['main_data']]) # An equivalent command

colnames(simple_exdf) <- "B"
rownames(simple_exdf) <- 2

colnames(simple_exdf)
rownames(simple_exdf)

PhotoGEA documentation built on April 11, 2025, 5:48 p.m.