View source: R/PLNmixturefit-S3methods.R
plot.PLNmixturefit | R Documentation |
PLNmixturefit
objectRepresent the result of the clustering either by coloring the individual in a two-dimension PCA factor map, or by representing the expected matrix of count reorder according to the clustering.
## S3 method for class 'PLNmixturefit'
plot(x, type = c("pca", "matrix"), main = NULL, plot = TRUE, ...)
x |
an R6 object with class |
type |
character for the type of plot, either "pca", for or "matrix". Default is |
main |
character. A title for the plot. If NULL (the default), an hopefully appropriate title will be used. |
plot |
logical. Should the plot be displayed or sent back as |
... |
Not used (S3 compatibility). |
a ggplot
graphic
data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
myPLN <- PLNmixture(Abundance ~ 1 + offset(log(Offset)),
data = trichoptera, control = PLNmixture_param(smoothing = "none")) %>% getBestModel()
## Not run:
plot(myPLN, "pca")
plot(myPLN, "matrix")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.