idx_slice | R Documentation |
Analagous to a left-join of the input against a differently shaped index.
idx_slice(x, ..., .keep_all = FALSE)
x |
idx_tbl indexvector |
... |
index values to slice. If unnamed, refer to idx_cols of x in order. If named they all must be named, and refer to idx_cols by name. |
.keep_all |
unused, but perhaps to be used in future. |
idx_tbl with the same axes as input.
pop <- idx_tibble(tidyr::population, idx_cols = c("country", "year"))
idx_slice(pop, "Armenia")
idx_slice(pop, year=2000)
pop_grow <- pop / idx_slice(pop, year=2000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.