Learn R Programming

PhotoGEA (version 1.4.0)

dimnames.exdf: 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 exdf
dimnames(x)

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

Value

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

Arguments

x

An exdf object.

value

A possible value for dimnames(x)

See Also

exdf

Examples

Run this code
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)

Run the code above in your browser using DataLab