Description Usage Arguments Details Value Author(s) Examples
View source: R/plot_density_3D.R
This function displays density of individuals from various groups created by create_group(). This wraps "persp" from package "graphics" and thus takes additional graphical input shown in example.
1 2 3 |
name |
Name of the "PCA" object containing the assay data |
Assay |
Name of an Assay |
group |
Names of a group |
PC1, PC2 |
Numbers corresponding to the principal components on which density is to be calculated |
static |
Logical if TRUE a static plot is generated. default = FALSE |
gridsize |
A number used in kernel smoothing. default is 100 |
groupinfo |
Same as integrate_variables() |
... |
additional arguments passed to base function "persp" from package "graphics" |
2D density is calculated using the "kde2d"" function from package "MASS"" which use kernel density estimation (KDE) to calculate density of 2D data. If the variance on either or both of the PCs are 0, the KDE can't be calculated.
Displays 3D density plots of PCs
Subhadeep Das <subhadeep1024@gmail.com>
1 2 3 4 5 6 7 8 | PCAlist <- integrate_variables(Assays = c("H2az"),
name = multi_assay,
groups = c("WE","RE"), groupinfo = groupinfo_ext,
scale.unit = FALSE, graph = FALSE)
plot_density_3D(name = PCAlist, Assay = "H2az",
group = "WE", PC1 = 1, PC2 = 2, grid_size = 100,
static = FALSE, groupinfo = groupinfo_ext)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.