View source: R/make_hexbin_label.R
make_hexbin_label | R Documentation |
Group label plot position.
make_hexbin_label(sce, col)
sce |
A |
col |
The name referring to one column in meta data for which the label position on the plot is calculated for every level. The chosen column needs to be a factor. |
A dataframe.
# For SingleCellExperiment object
library(TENxPBMCData)
library(scater)
tenx_pbmc3k <- TENxPBMCData(dataset = "pbmc3k")
rm_ind <- calculateAverage(tenx_pbmc3k) < 0.1
tenx_pbmc3k <- tenx_pbmc3k[!rm_ind, ]
tenx_pbmc3k <- logNormCounts(tenx_pbmc3k)
tenx_pbmc3k <- runPCA(tenx_pbmc3k)
tenx_pbmc3k <- make_hexbin(tenx_pbmc3k, 80, dimension_reduction = "PCA")
tenx_pbmc3k$random <- factor(sample(1:3, ncol(tenx_pbmc3k), replace = TRUE))
make_hexbin_label(tenx_pbmc3k, col = "random")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.