Given a melted data frame, a vector of ids, a value, and a variable, this will make the value of that variable at all those ids into the given value. Useful in interpolation.
1 | swap_multiple_ids(ids, value, variable, data = get_data())
|
ids |
vector. A list of ids to swap. |
value |
character. The value that the variable will be set to. |
variable |
character. The variable in which the transformations will take place. |
data. |
The data to be transformed. This is assumed to be a three column melted dataframe, using reshape2 <http://cran.r-project.org/web/packages/reshape2/index.html>. The first column should contain IDs, the second column should contain variable names, and the third column should contain variable values. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.