| rray_set_axis_names | R Documentation |
rray_set_axis_names() sets the names for a single axis of an array,
leaving every other axis untouched. The titles of x are kept.
rray_set_row_names() and rray_set_column_names() are shortcuts for
rray_set_axis_names(x, 1, names) and rray_set_axis_names(x, 2, names).
rray_set_axis_names(x, axis, names)
rray_set_row_names(x, names)
rray_set_column_names(x, names)
x |
An array. |
axis |
The axis to set names for, given by position or by title. |
names |
A character vector of names for |
x with new names for axis.
x <- array(1:6, c(2, 3))
rray_set_axis_names(x, 1, c("r1", "r2"))
rray_set_axis_names(x, 2, c("c1", "c2", "c3"))
# By title
y <- rray_set_titles(x, c("row", "col"))
rray_set_axis_names(y, "col", c("c1", "c2", "c3"))
rray_set_row_names(x, c("r1", "r2"))
rray_set_column_names(x, c("c1", "c2", "c3"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.