sortIndGroupLabVec | R Documentation |
Change group labels according to sorted response size, within a facet.
sortIndGroupLabVec(data, groupLabVec, calcStat)
data |
dataframe. Dataframe with columns 'group' and 'resp', where the elements in 'resp' are the responses of individual subjects, and elements in 'group' specify the subject group. |
groupLabVec |
named character vector. Specifies labels for each of the unique elements in the 'group' column of
|
A named vector, where the groups are sorted according to response size.
data = data.frame( group = c( 1, 1, 1, 2, 2, 2, 3, 3, 3 ),
resp = c( 5, 4, 6, 10, 12, 7, 6, 1, 4 ) )
groupLabVec = c( "1" = "A", "2" = "B", "3" = "C" )
sortIndGroupLabVec( data, groupLabVec )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.