View source: R/wrap.generate.R
wrap.generate | R Documentation |
Searches the data frame for pairs of columns whose names are identical except for specific strings that you've embedded within them–such as "T1" versus "T2" or "Participant1" versus "Participant2"–and then generates new columns by computing sums, differences, or means between pairs of corresponding columns. After generating columns, the function assigns the revised data frame directly to the Global Environment.
wrap.generate(df, string1, string2, operation, newString = operation)
df |
The data frame |
string1, string2 |
Character strings embedded in the names of corresponding columns |
operation |
Character string to specify the operation ( |
newString |
Character string to replace |
## Computing differences between T1 responses and T2 responses wrap.generate(df = bdata, string1 = "T1", string2 = "T2", operation = "difference")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.