Description Usage Arguments Details Value See Also Examples
Sets the dimensions names for a particular rank, without requiring dimnames for the other ranks.
1 | set_dimnames_for_rank(x, rank, ..., .dots = NULL)
|
x |
input tidytensor to set dimnames on. |
rank |
rank to set the dimnames on. |
... |
dimnames to assign (quoted or unquoted). |
.dots |
character vector of dimnames to assign (quoted or unquoted). |
If all dimnames are unset, they will be set to NA for the other ranks, otherwise they will be left alone.
a tidytensor with dimnames set.
ranknames<-
, dimnames
, set_dimnames
1 2 3 4 | t <- as.tidytensor(array(1:(3 * 2), dim = c(3, 2)))
t <- set_dimnames_for_rank(t, 2, valset1, valset2)
t <- set_dimnames_for_rank(t, 2, .dots = c("valset1", "valset2"))
print(t)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.