PLNmixturefit
objectR/PLNmixturefit-S3methods.R
plot.PLNmixturefit.Rd
Represent 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.
an R6 object with class PLNmixturefit
character for the type of plot, either "pca", for or "matrix". Default is "pca"
.
character. A title for the plot. If NULL (the default), an hopefully appropriate title will be used.
logical. Should the plot be displayed or sent back as ggplot
object
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()
#>
#> Initialization...
#>
#> Adjusting 5 PLN mixture models.
#> number of cluster = 1
number of cluster = 2
number of cluster = 3
number of cluster = 4
number of cluster = 5
#> Post-treatments
#> DONE!
if (FALSE) { # \dontrun{
plot(myPLN, "pca")
plot(myPLN, "matrix")
} # }