Description Usage Arguments Value Author(s) See Also Examples
This function can be used to add a trendline for some given variable to an ultrametric phylogenetic tree.
1 | add.trendline(phy, x, axis = TRUE, ...)
|
phy |
An object of class |
x |
A matrix, containing data points: x-values (ages) in the first column, y-values in the second columns. |
axis |
A logical indicating if a y-axis should be plotted. |
... |
Further arguments to be passed to |
none
Christoph Heibl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # phylogenetic tree of wild barley
# --------------------------------
data(hordeum)
# plot tree
# ---------
plot(hordeum)
# use some dummy data ...
# -----------------------
x <- seq(from = 12, to = 0, length.out = 15)
y <- c(1, 2, 4, 4, 6, 5, 11, 13, 15, 16, 12, 14, 15, 17, 18)
data <- cbind(x, y)
# ... to plot trendline:
# ----------------------
add.trendline(hordeum, x = data, col = "red", lty = 2)
axisChrono()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.