Description Usage Arguments Examples
Throwchart method is useful for visualising paired data, such as before/after data sets. Each pair of points are set on a horizontal axis and joined by a parabola. The height of the parabola is proportional to the difference: after- before = difference. If the difference is negative (after < before) then the curve is drawn under the axis.
1 | throwchart(before, after, col, id, lwd, xlim, ylim, offSet, webinteract)
|
before |
[numeric] or [integer]: A (non-empty) vector of data values. |
after |
[numeric] or [integer]: A (non-empty) vector of data values. |
col |
[character]: A vector of hex code colours, by default "#123". |
id |
[factor]: Column of string or number identifiers. |
lwd |
[integer]: Line width, a column of line widths, by default value is 2.5. |
xlim |
[numeric]: 2 value colum with x limits. |
ylim |
[numeric]: 2 value colum with y limits. |
offSet |
[integer]: Single value offset for the graph. |
webinteract |
[bool]: Is the function used in interactive mode? |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | if(interactive()){
throwchart(c(1,2),c(2,8),c("#000","#F82"),id = c("id1","id2"),c(1,5))
throwchart(c(1,2),c(2,8), offSet = 1, webinteract=TRUE)
}
if(!interactive()){
throwchart(c(1,2),c(2,8), offSet = 1, webinteract=FALSE)
throwchart(c(1,2),c(2,1), webinteract=FALSE)
throwchart(c(1,2),c(2,8),c("#000","#F00"),id = c("id1","id2"),c(1,5), webinteract=FALSE)
n <- 10
Avant <- rnorm(n)
Apres <- Avant + rnorm(n) + 10
throwchart(Avant, Apres, xlim = c(-4,14), webinteract = FALSE)
throwchart(Avant, Apres, offSet = 0, webinteract = FALSE)
throwchart(Avant, Apres, offSet = 8, webinteract = FALSE)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.