Description Usage Arguments Value Examples
Simple spread
1 | my_spread(d)
|
d |
data frame containing columns named |
"wide" data frame with g
spread, carrying along the values of x
. There needs to be another variable indicating which row should contain the result.
1 2 3 4 5 6 7 8 9 10 11 | requireNamespace("tibble", quietly = TRUE)
dd=tibble::tribble(
~r, ~x, ~g,
1, 10, "a",
2, 12, "a",
3, 14, "a",
1, 15, "b",
2, 17, "b",
3, 19, "b"
)
my_spread(dd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.