rankplot | R Documentation |
Display rankings of 3 items by hexagon and 4 items by truncated octahedron. Each line linking two points represents a Kendall distance of one. The size of the point is proportional to the frequency of that particular ranking.
rankplot(dset,trans=FALSE,label.type="item", circle.col="black", circle.bg=FALSE)
dset |
a ranking dataset |
trans |
(For 4-item ranking dataset) Another representation of the rankings. |
label.type |
The type of label for rankings to be displayed (default is item). ranking : ranking, ordering: ordering with item numbers, item: ordering with alphabets |
circle.col |
The colour of the circles (default is black). |
circle.bg |
The colour of the background of the circles (default is none). |
As a ranking dataset of k items can be represented in k-1 dimensions, ranking data with 3 or 4 items can be represented in graphs without losing any information. For visualization of ranking data with more items, multidimensional preference analysis can be used.
Paul H. Lee and Philip L. H. Yu
Thompson, G. L. (1993). Graphical techniques for ranked data. In Fligner, M. A., and Verducci, J. S. (eds.) Probability Models and Statistical Analyses for Ranking Data, pp. 294-298.
## create an artificial dataset X1 <- c(1,1,2,2,3,3) X2 <- c(2,3,1,3,1,2) X3 <- c(3,2,3,1,2,1) n <- c(6,5,4,3,2,1) test <- data.frame(X1,X2,X3,n) ## plotting the artificial dataset in a hexagon ## rankplot(test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.