list_ones | R Documentation |
Create a list with vectors of ones from a numeric vector
list_ones(x)
x |
a numeric vector |
A list of vectors with ones
Gaston Sanchez
listify
# let's say you have a numeric vector like this
num_vec = c(2, 3, 1, 4)
# get indices in vector format
list_ones(num_vec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.