Description Usage Arguments Value See Also Examples
Creates an interactive graph with a panel having a number of curves (say, a phenotype measured over time) linked to one or two (or no) scatter plots (say, of the first vs middle and middle vs last times).
1 2 3 4 5 6 7 8 9 |
curveMatrix |
Matrix (dim n_ind x n_times) with outcomes |
times |
Vector (length n_times) with time points for the columns of curveMatrix |
scatter1 |
Matrix (dim n_ind x 2) with data for the first scatterplot |
scatter2 |
Matrix (dim n_ind x 2) with data for the second scatterplot |
group |
Optional vector of groups of individuals (e.g., a genotype) |
chartOpts |
A list of options for configuring the chart (see the coffeescript code). Each element must be named using the corresponding option. |
digits |
Round data to this number of significant digits before passing to the chart function. (Use NULL to not round.) |
An object of class 'htmlwidget' that will intelligently print itself into HTML in a variety of contexts including the R console, within R Markdown documents, and within Shiny output bindings.
[iplotCorr()], [iplot()], [scat2scat()]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # random growth curves, based on some data
times <- 1:16
n <- 100
start <- rnorm(n, 5.2, 0.8)
slope1to5 <- rnorm(n, 2.6, 0.5)
slope5to16 <- rnorm(n, 0.24 + 0.09*slope1to5, 0.195)
y <- matrix(ncol=16, nrow=n)
y[,1] <- start
for(j in 2:5)
y[,j] <- y[,j-1] + slope1to5
for(j in 6:16)
y[,j] <- y[,j-1] + slope5to16
y <- y + rnorm(prod(dim(y)), 0, 0.35)
iplotCurves(y, times, y[,c(1,5)], y[,c(5,16)],
chartOpts=list(curves_xlab="Time", curves_ylab="Size",
scat1_xlab="Size at T=1", scat1_ylab="Size at T=5",
scat2_xlab="Size at T=5", scat2_ylab="Size at T=16"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.