elements {OpenRepGrid} | R Documentation |
Get or replace element names
Description
Allows to get and set element names.
Replaces the older functions getElementNames
, getElementNames2
,
and eNames
which are deprecated.
Usage
elements(x)
elements(x, position) <- value
Arguments
x |
A repgrid object. |
position |
Index where to insert element. |
value |
Character vector of element names. |
Examples
# copy Boeker grid to x
x <- boeker
## get element names
e <- elements(x)
e
## replace element names
elements(x) <- rev(e) # reverse all element names
elements(x)[1] <- "Hannes" # replace name of first element
# replace names of elements 1 and 3
elements(x)[c(1, 3)] <- c("element 1", "element 3")
[Package OpenRepGrid version 0.1.15 Index]