Description Usage Arguments Details Value See Also Examples
Turn a wide dataset of sales pairs into a long data set with a single price and date variable.
1 2 3 4 5 6 7 8 |
x |
A data.frame, or something that can be coerced into one. |
id |
Column name in |
date |
Column name in |
date_prev |
Column name in |
price |
Column name in |
price_prev |
Column name in |
For each id, the previous price and date for the earliest sale are extracted, then concatenated (row-wise) back into x
.
Extra columns are expanded in the long format.
Un-making sales pairs is generally not well defined with missing and duplicated values, and these should be removed prior to un-making pairs.
A data.frame.
rs_pair
to perform the inverse operation.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.