hoeffDPlot | R Documentation |
The function hoeffDPlot
creates via ggplot
a violin plot per
factor, a jitter plot of the data points and (optionally) connects the points
via lines. hoeffDPlot
uses the plotly
package to make the
figure interactive.
hoeffDPlot(df, lines = TRUE)
df |
|
lines |
|
The function hoeffDPlot
will create the violin plot and jitter plot
according to the specified order given by the colnames of df
.
hoeffDPlot
will thus internally refactor the colnames
of the
supplied data.frame
according to the order of the colnames
.
gg
object from ggplot2
## create se
set.seed(1)
a <- matrix(rnorm(10000), nrow = 1000, ncol = 10,
dimnames = list(seq_len(1000), paste("sample", seq_len(10))))
a[c(1, 5, 8), seq_len(5)] <- NA
cD <- data.frame(name = colnames(a), type = c(rep("1", 5), rep("2", 5)))
rD <- data.frame(spectra = rownames(a))
se <- SummarizedExperiment::SummarizedExperiment(assay = a,
rowData = rD, colData = cD)
tbl <- MAvalues(se, log = FALSE, group = "all")
hd_r <- hoeffDValues(tbl, "raw")
## normalized values
se_n <- se
assay(se_n) <- normalizeAssay(a, "sum")
tbl_n <- MAvalues(se_n, log = FALSE, group = "all")
hd_n <- hoeffDValues(tbl_n, "normalized")
df <- data.frame(raw = hd_r, normalized = hd_n)
hoeffDPlot(df, lines = TRUE)
hoeffDPlot(df, lines = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.