| addBins | R Documentation |
Add an optional bin metadata column to gr,
to serve as annotations
for the epistack plots.
addBins(rse, nbins = 5L, bin = NULL)
rse |
a SummarizedExperiment or a GRanges object. |
nbins |
an integer number, the number of bins. |
bin |
a vector containing pre-determined bins, in the same
order as |
nbins is taken into account only if bin is NULL.
rse should be sorted first, usually with the
addMetricAndArrangeGRanges()
function. addBin(rse, bin = vec) is equivalent to
rse$bin <- vec, while
addBin(rse, nbins = 5) will create 5 bins of equal size based on
rse
order.
the RangedSummarizedExperiment or GRanges object with a
new bin metadata column
addMetricAndArrangeGRanges
plotBinning
data("stackepi")
addBins(stackepi)
# 3 bins instead of 5
addBins(stackepi, nbins = 3)
# assign bins using a vector
addBins(stackepi, bin = rep(c("a", "b", "c"),
length.out = length(stackepi)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.