Description Usage Arguments Value Examples
View source: R/HighestMedianRules.R
This function returns a custom description of the grades of a candidate in terms of the shares of proponents (p), opponents (q), median grades (g), and the gauge (i.e. the median grade followed by + or -, a + corresponding to a larger share of proponents than opponents).
| 1 | 
| grades | A numeric vector containing the shares of each grades of a candidate, from the lowest grade to the highest. | 
| k | The quantile used to compute the gauge. Default to 0.5 (the median). For more details, see paragraph Extensions in 3.2.1 of "Tie-Breaking the Highest Median", Fabre, Social Choice & Welfare (forthcoming). | 
| scale | A numeric vector containing the values of the scale of grades. Default to c((floor(-length(grades)/2)+1):(length(grades)+floor(-length(grades)/2))). | 
| return | A string containing the information to return. Default to 'qp' (shares of opponents and proponents). Possible values: 'g', 'p', 'q', 'pq', 'qp', 'qpg', 'pqg', 'gpq', 'gqp', 'text' (i.e. the gauge), 'all'. If the string does not match one of the above, 'all' is returned. | 
A double, a character vector or a double vector. Depending on what is passed in return.
| 1 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.