Description Usage Arguments See Also Examples
Split and deselect the column used to split by in a single function call.
1 |
data |
A dataframe or tibble. |
col |
Target column. |
drop |
logical indicating if levels that do not occur should be dropped
(if |
sep |
character string, passed to |
lex.order |
logical, passed to |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(tidyverse)
test_data <-
tibble(
Group = sample(c("Apple", "Pear"), size = 10, replace = TRUE),
A = sample(c(NA_integer_, 1:3), size = 10, replace = TRUE),
B = sample(c(NA_integer_, 4:6), size = 10, replace = TRUE)
)
# Split
split_by(test_data,
col = Group)
# Split Deselect
split_deselect(test_data,
col = Group)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.