pair.plot | R Documentation |
Plots pairwise comparisons from a data frame (typically output from test.dispRity
).
pair.plot(
data,
what,
col = c("black", "white"),
legend = FALSE,
binary,
diag,
add,
lower = TRUE,
...
)
data |
A |
what |
A |
col |
The two extremes of a color gradient (default = |
legend |
Logical, whether to plot the legend or not. |
binary |
Optional, if the results must be binary, a |
diag |
Optional, can be |
add |
Optional, whether to add significance tokens can be |
lower |
Optional, logical, whether to add tokens for values lower than |
... |
Any other options to be passed to |
The number of rows (i.e. comparisons) in matrix
must be equal to the results of a pairwise combination.
In general, the number of rows x
must satisfy the equation: x = n^2 / 2 - n / 2
where n
must be an integer greater or equal than 2.
Thomas Guillerme
test.dispRity
.
## A small matrix of two pairwise comparisons of seven elements (2*21 comparisons)
data <- matrix(data = runif(42), ncol = 2)
## Plotting the first column as a pairwise comparisons
pair.plot(data, what = 1, col = c("orange", "blue"), legend = TRUE, diag = 1)
## Adding some tokens for each value below 0.2 in the second column
pair.plot(data, what = 2, binary = 0.2, add = "*", cex = 2)
## Loading disparity data
data(disparity)
## Testing the pairwise difference between slices
tests <- test.dispRity(disparity, test = wilcox.test, correction = "bonferroni")
## Plotting the significance
pair.plot(as.data.frame(tests), what = "p.value", binary = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.