Description Usage Arguments Examples
Given a data frame and two column names, this function returns a data frame where groupings of the first variable contain differences with respect to the second variable.
1 |
tbl |
A data frame with at least two columns |
grouping |
The column name specifying how to group the rows. |
warp_by |
The column name specifying the differences within groups to look for. |
1 2 3 4 5 6 7 8 9 | ## Not run:
fruit_prices <- data.frame(Fruit = c("Apple", "Apple", "Orange", "Orange", "Pear", "Pear"),
Price = c(1.2, 1.3, 1.1, 1.1, 1.4, 1.1))
warp_tbl(fruit_prices, "Fruit", "Price")
warp_tbl(fruit_prices, "Price", "Fruit")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.