Skip to content

Bug in 'addtext' when the ADEgS is a superposition #2

@aursiber

Description

@aursiber

Three examples that don't work.

library(adegraphics)
data(granulo, package = "ade4")
df <- data.frame(t(apply(granulo$tab, 1, function(x) x / sum(x))))
pca <- ade4::dudi.pca(df, scal = FALSE, scan = FALSE)

g1 <- s.arrow(ade4::dudi.pca(data.frame(df), scan = F, nf = 2)$co, plot = FALSE)
g2 <- s.label(pca$li, plabels.cex = 0.5, plabels.col = "blue", plot = FALSE)
g3 <- add.ADEg(g2)

addtext(g3, -0.9, -0.2, "Data Granulo", plabels.cex = 1.2, which = 1) # error : unable to find an inherited method for function ‘printSuperpose’ for signature ‘"S2.label", "ADEgS"’
addtext(g3, -0.5, -0.1, "Data Granulo", plabels.cex = 1.2, which = 2) # doesn't work
addtext(g3, -0.9, -0.2, "Data Granulo", plabels.cex = 1.2, which = 1:2) # doesn't work

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions