Description Usage Arguments Value Examples
Color-code three-part compositions with a ternary sextant color scale and return a color key.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
df |
Data frame of compositional data. |
p1 |
Column name for variable in df giving first proportion of ternary composition (string). |
p2 |
Column name for variable in df giving second proportion of ternary composition (string). |
p3 |
Column name for variable in df giving third proportion of ternary composition (string). |
center |
Ternary coordinates of the color scale center. (default = 1/3,1/3,1/3). NA puts center over the compositional mean of the data. |
values |
6 element character vector of rgb-codes. |
legend |
Should a legend be returned along with the colors? (default=TRUE) |
show_data |
Should the data be shown on the legend? (default=TRUE) |
show_center |
Should the center be shown on the legend? (default=FALSE if center is at c(1/3, 1/3, 1/3), otherwise TRUE) |
label_as |
"pct" for percent-share labels or "pct_diff" for percent-point-difference from center labels. (default='pct' if center is at c(1/3, 1/3, 1/3), otherwise 'pct_diff') |
crop |
Should the legend be cropped to the data? (default=FALSE) |
input_validation |
Should the function arguments be validated? (default=TRUE) |
legend=FALSE: A vector of rgbs hex-codes representing the ternary balance scheme colors.
legend=TRUE: A list with elements "rgb" and "key".
1 2 | P <- as.data.frame(prop.table(matrix(runif(3^6), ncol = 3), 1))
TricoloreSextant(P, 'V1', 'V2', 'V3')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.