A function to make manual reassignments of ranks to individual data zones, can be used when there are strange exceptions such as empty data zones. The function needs a data.frame of ranks containing a column named 'data_zone'. The function will take that data.frame change the rank of the indicator in question (with an optional offset) and then re-rank. The function returns the corrected data.frame.
1 | reassignRank(data, domain, data_zone, end = "max", offset = 0)
|
data |
data.frame containing the data zone called 'data_zone' and domain ranks. |
domain |
a character value, the collumn name of the domain in which a rank should be reassigned. |
data_zone |
a character value, the name of the data zone whose rank should be changed. |
end |
character value, one of either "max" or "min". To wich end should the data zone be moved? "max" to give this data zone the largest numerical value in rank and "min" to give it the lowest numerical value in rank default value is "max". |
offset |
an positive integer value specifying the number of ranks by which to offset the reassignment, if for example you want a data zone to be the least but one deprived for a particular domain. Default value is 0. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.