powered by
This implements the Webster/Sainte-Lagu<U+00EB> method to allocate six triangles in each hexagon, in proportion to counts in two or more classes.
tri_alloc(countmatrix, colours, classes=colours, names = rownames(countmatrix))
A matrix of counts with a column for each class and a row for each hexagon.
A vector of class names, or colour names with one for each class
A vector of names, for each row of countmatrix, to be applied to the output
countmatrix
Matrix of class names, with six columns. The rownames will be set to names if provided.
names
# NOT RUN { data(dhb_cars) tri_alloc(dhb_cars[,-1], c("green","gold","orange","goldenrod"), names=dhb_cars$dhb ) tri_alloc(dhb_cars[,-1], c("0","1","2","3+"), names=dhb_cars$dhb ) # }
Run the code above in your browser using DataLab