translateHidden | R Documentation |
When the user subsets a cube in which "useNA" is either "no" or "ifAny" they are not interacting with hidden categories. This function takes the index which they provide and translates it to an index which includes hidden categories.
translateHidden(index, not_hidden, drop = TRUE, vis = not_hidden)
index |
The index to be translated |
Logical, | |
drop |
Should dimensions with a single category be dropped |
vis |
Logical, is a category visible or not. Because of the |
For example, if v
includes c("cat1", "hidden_cat", "cat2") and useNA
is
"no". The user will see v
as c("cat1", "cat2") and might subset it with
v[c(2,1)]
. We need to skip over the hidden category and change the index
to account for any hidden categories which might appear in the vector. Here
the translated index would be c(3,1
. This function does all of that.
The translated index
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.