1 2 3 4 5 6 7 | multiplots(my.data = my.data, xvar, yvar, classes,
xlab = names(my.data[xvar]), fit = "loess", log = "",
ylab = names(my.data[yvar]), type = "n", pos = "topleft", cols = 1:20,
pchs = 1:20, rounder1 = 2, rounder2 = 2, ltys = 1:20, main = "",
rounder = 2, interval = "prediction", level = 0.5, predx = 100,
add.pt = TRUE, add.ln = FALSE, lty = 1, cex = 1, las = 1,
cex1 = 1, ...)
|
my.data |
data frame |
xvar |
x variable, either column name or index value |
yvar |
y variable, either column name or index value |
classes |
group and a factor variable |
fit |
fitted line, either loess or linear or none |
cols |
colors for different classes |
pchs |
point type |
ltys |
line types for different groups |
interval |
"prediction" or "confidence" interval |
predx |
predicted value at 100 \itemadd.ptadd predicted point \itemadd.lnadd fitted lines |
The output of this function to return 1.Weighted Average, 2. cdf_Abundance based, 3. cdf_ presence/absence based; 4. ecdf weighted, 5. cdf weight new; 6. Linear logistic regression, 7. quadratic logistic 8. GAM 5~7 using full data range; 9~11. repeat 6~8 but uses observed range for each single taxon; 12 Count. 13. Raw quantiles set.seed(1) n = 50 x <- rlnorm(n) + 1:n x <- (x - min(x))/max(x) y <- n + 1:n + (rnorm(n))*0.2*n g <- paste0("g", sample(1:5, n)) par(mfrow=c(1,2)) plot(y~x) multiplots(data = data.frame(x,y, g), xvar= "x", yvar = "y", classes = "g", fit = "linear") change interval, plot, point, regression scatter
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.