Description Usage Arguments Functions Examples
Add quantile lines to existing plot. QLines is for long data. QMatLines is for short data.
1 2 3 4 5 |
x |
an array of x variable. For QLines, it should be repeating itself, and for QMatLines, non-repeating. |
ys |
Either an array or matrix of y variable. For QLines, it should be an array, and for QMatLines, a matrix with columns for iterations. |
qs |
an array of quantiles. Default at c(0.05,0.95). |
mean.lwd |
An integer for indicating the width of mean. Default at 1. |
mean.col |
Color for mean. Default at rainbow.f(1,1). |
q.col |
Color for quantiles. Default at rainbow.f(1,1). |
QMatLines
: for short table
1 2 3 4 5 6 7 8 9 10 11 12 | # Generate a long table
niter <- 100
df <- data.frame("Date"=rep(seq(as.Date("2010-1-1"), by="month", length.out = 12),niter)
, "Iter" = rep(1:niter,each=12), "Y"=rnorm(12*niter))
for (i in 2:nrow(df))if(diff(df$Iter)[i-1]==0) df$Y[i] <- df$Y[i] + df$Y[i-1]
plot(df$Date, df$Y, col=red.f(0.05), pch=19)
QLines(df$Date, df$Y, mean.lwd = 2)
# A short Table
df <- cast(df, Date ~ Iter, value="Y")
QMatLines(df$Date, df[,-1], qs=c(0.25,0.75), q.col=gray.f(0.5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.