Description Usage Arguments Author(s) Examples
This function generates a plot for a numeric or factor variable. A data frame/matrix with XY coordinates is required. The X and Y axes in the plot correspond to the rank of the X and Y coordinates, respectively.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | eco.rankplot(
input,
XY,
xlabel = NULL,
ylabel = NULL,
title = NULL,
legendlabel = NULL,
background = c("grey", "white"),
...
)
## S4 method for signature 'eco.lsa,missing,missing'
eco.rankplot(
input,
XY,
xlabel,
ylabel,
title,
legendlabel,
background = c("grey", "white"),
significant = TRUE,
rescaled = FALSE,
ns = NULL,
interactivePlot = TRUE
)
## S4 method for signature 'numeric,dataframeORmatrix,missing'
eco.rankplot(
input,
XY,
xlabel,
ylabel,
title,
legendlabel,
background = c("grey", "white"),
interactivePlot = TRUE
)
## S4 method for signature 'factor,dataframeORmatrix,missing'
eco.rankplot(
input,
XY,
xlabel,
ylabel,
title,
legendlabel,
background = c("grey", "white"),
interactivePlot = TRUE
)
|
input |
Numeric/factor variable. |
XY |
Data frame or matrix with X-Y coordinates. |
xlabel |
Optional label for x axis. |
ylabel |
Optional label for y axis. |
title |
Optional title label. |
legendlabel |
Optional legend label. |
background |
Background color ("grey" or "white")- |
... |
Additional elements to the generic. |
significant |
Should only the individuals with significant
result be colored?. This argument can be used with |
rescaled |
rescale values to [-1, 1] range? |
ns |
Color for non significant individuals, when significant = TRUE.
This argument can be used with |
interactivePlot |
Show an interactive plot via plotly? (default: TRUE) |
Leandro Roser learoser@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
data(eco3)
# The data set eco3 has 50 points in two sites,
# but points are not visible in a usual X-Y plot,
# due to the small distance among them in relation to the large
# distance between sites
var <- eco3[["P"]][,1]
plot(eco3[["XY"]], col = var)
x <- sample(1:100, 30)
y <- sample(1:100, 30)
# in a rankplot graph, the inter-individual distances are
# reduced to a single scale
rankeco3 <- eco.rankplot(var, eco3[["XY"]])
rankeco3
# the rankplot method supports the use of ggplot2 syntax with ggplot2 graphs
require(ggplot2)
rankeco3 <- eco.rankplot(var, eco3[["XY"]], interactivePlot = FALSE)
rankeco3 <- rankeco3 + theme_bw() + theme(legend.position="none")
rankeco3
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.