Description Usage Arguments See Also Examples
Interactive tree plot with search bar.
Any numeric data can be plotted on the y-axis but the x-axis should be discrete groups. Points will be labeled with their unique names and y-value.
1 2 3 4 5 6 7 8 9 10 |
y |
a uniquely-named numeric vector |
group |
vector of grouping ( |
ylim |
y-axis limits |
xlab, ylab, main |
the x-, y-, and main labels |
plotOpts |
list of additional plot options; see
|
digits |
integer indicating number of significant digits to use |
iplotMap
from the qtlcharts package
Other iplots:
icorr()
,
icurve()
,
idot()
,
iscatter()
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 | ## basic usage with and without groups
itree(setNames(rnorm(10), letters[1:10]))
itree(setNames(rnorm(20), letters[1:20]), group = 1:4)
## another example
set.seed(1)
n <- 100
ng <- 5
gr <- sort(sample(LETTERS[1:ng], n, replace = TRUE))
yv <- kinda_sort(runif(n, -1, 1), n = n / 2) * 100
itree(yv, gr, main = 'Subject response from baseline',
ylim = c(-100,100), xlab = 'Treatment arm', ylab = '% change')
## search is more useful with lots of data
set.seed(1)
p0 <- function(x) paste0(x, collapse = '')
n <- 500
gr <- replicate(n, (function()
p0(sample(c('A','T','C','G'), 15, replace = TRUE)))())
y <- setNames(rpois(n, 40), gr)
## hacky way to remove tick labels which start running together
gr_labels <- Map(function(x) p0(rep(' ', x)), sequence(n))
itree(y, unlist(gr_labels), ylab = 'Frequency', xlab = 'Sequence',
plotOpts = list(tickwidth = 2, linewidth = 5, width = 2000))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.