R Under development (unstable) (2023-10-10 r85312 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(adegraphics) The legacy packages maptools, rgdal, and rgeos, underpinning the sp package, which was just loaded, were retired in October 2023. Please refer to R-spatial evolution reports for details, especially https://r-spatial.org/r/2023/05/15/evolution4.html. It may be desirable to make the sf package available; package maintainers should consider adding sf to Suggests:. Registered S3 methods overwritten by 'adegraphics': method from biplot.dudi ade4 kplot.foucart ade4 kplot.mcoa ade4 kplot.mfa ade4 kplot.pta ade4 kplot.sepan ade4 kplot.statis ade4 scatter.coa ade4 scatter.dudi ade4 scatter.nipals ade4 scatter.pco ade4 score.acm ade4 score.mix ade4 score.pca ade4 screeplot.dudi ade4 > pdf("s.distri.pdf") > > xy5 <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1)) > w1 <- as.numeric((xy5$x > 0) & (xy5$y > 0)) > w2 <- ((xy5$x > 0) & (xy5$y < 0)) * (1 - xy5$y) * xy5$x > w3 <- ((xy5$x < 0) & (xy5$y > 0)) * (1 - xy5$x) * xy5$y > w4 <- ((xy5$x < 0) & (xy5$y < 0)) * xy5$y * xy5$x > distri <- data.frame(a = w1 / sum(w1), b = w2 / sum(w2), c = w3 / sum(w3), d = w4 / sum(w4)) > g5 <- s.distri(xy5, distri, plabels.boxes = list(col = "white", alpha = 1), plabels.cex = 2, plabels.col = 1:5) > > data(rpjdl, package = "ade4") > xy6 <- ade4::dudi.coa(rpjdl$fau, scan = FALSE)$li + 3 > g6 <- s.distri(xy6, rpjdl$fau[, 5], ellipseSize = 1.5, psub = list(text = rpjdl$frlab[5], cex = 2, pos = c(0.2, 0.1))) > g7 <- s.distri(xy6, rpjdl$fau[, 5], ellipseSize = 1.5, psub = list(text = rpjdl$frlab[5], cex = 2, pos = c(0.2, 0.1)), porigin = list(include = FALSE), pellipses.axes.col = "blue") > > ## test add > g8 <- s.distri(xy6, rpjdl$fau[, 5], ellipseSize = 1.5, psub = list(text = rpjdl$frlab[5], cex = 2, pos = c(0.2, 0.1)), porigin.include = FALSE, pellipses = list(col = "blue")) > g9 <- s.distri(xy6, rpjdl$fau[, 12], ellipseSize = 1.5, psub = list(text = rpjdl$frlab[5], cex = 2, pos = c(0.2, 0.1)), porigin.include = FALSE, pellipses = list(col = "red"), add = TRUE) > show(g9) ## g8 is a superposition, an ADEgS object > > ## add > index <- c(1, 5, 8, 20, 21, 23, 26, 33, 36, 44, 47, 49) > col <- colorRampPalette(c("blue", "red", "orange"))(49) > s.distri(xy6, rpjdl$fau[, 1], ellipseSize = 1, starSize = 0, porigin.include = FALSE, pellipses = list(col = col[1], alpha = 0.3)) > for(i in index[-1]) + s.distri(xy6, rpjdl$fau[, i], ellipseSize = 1, starSize = 0, porigin.include = FALSE, pellipses = list(col = col[i], alpha = 0.3), add = TRUE) > > current <- get("currentadeg", env = adegraphics:::.ADEgEnv) > print(current[[6]]) > length(current) == length(index) [1] TRUE > > proc.time() user system elapsed 2.12 0.21 2.31