diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 2bb3206a..d452295b 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -30,7 +30,7 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -58,7 +58,7 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: - args: 'c("--no-manual", "--as-cran", "--run-dontrun")' + args: 'c("--no-manual", "--as-cran")' error-on: '"error"' check-dir: '"check"' diff --git a/.github/workflows/build-bin-macOS-M1.yaml b/.github/workflows/build-bin-macOS-M1.yaml new file mode 100644 index 00000000..68ef0660 --- /dev/null +++ b/.github/workflows/build-bin-macOS-M1.yaml @@ -0,0 +1,56 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: build-macOS-M1 + +jobs: + build-bin-macOS-M1: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-14, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + pak-version: devel + extra-packages: any::rcmdcheck, any::XML + needs: check + # See https://github.com/r-lib/actions/issues/559 for the XML issue + + - name: Build + run: | + install.packages("pkgbuild") + pkgbuild::build(".", binary = TRUE) + shell: Rscript {0} + + - uses: actions/upload-artifact@v4 + with: + name: binaries-for-mac-M1 + path: /Users/runner/work/ade4/ade4_*.tgz + \ No newline at end of file diff --git a/.github/workflows/build-bin-macOS-x64.yaml b/.github/workflows/build-bin-macOS-x64.yaml index 6ab268e2..9aa9db5e 100644 --- a/.github/workflows/build-bin-macOS-x64.yaml +++ b/.github/workflows/build-bin-macOS-x64.yaml @@ -26,7 +26,7 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -49,7 +49,7 @@ jobs: pkgbuild::build(".", binary = TRUE) shell: Rscript {0} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: binaries-for-mac-x64 path: /Users/runner/work/ade4/ade4_*.tgz diff --git a/.github/workflows/build-bin-windows.yaml b/.github/workflows/build-bin-windows.yaml index 18c3484f..99339aff 100644 --- a/.github/workflows/build-bin-windows.yaml +++ b/.github/workflows/build-bin-windows.yaml @@ -26,7 +26,7 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -49,7 +49,7 @@ jobs: pkgbuild::build(".", binary = TRUE) shell: Rscript {0} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: binaries-for-windows path: D:/a/ade4/ade4*.zip diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 087f0b05..fb6645fb 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -20,7 +20,7 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 diff --git a/.github/workflows/revdepcheck.yml b/.github/workflows/revdepcheck.yml new file mode 100644 index 00000000..323d2ad3 --- /dev/null +++ b/.github/workflows/revdepcheck.yml @@ -0,0 +1,18 @@ +on: + workflow_dispatch: + inputs: + which: + type: choice + description: Which dependents to check + options: + - strong + - most + +name: Reverse dependency check + +jobs: + revdep_check: + name: Reverse check ${{ inputs.which }} dependents + uses: r-devel/recheck/.github/workflows/recheck.yml@v1 + with: + which: ${{ inputs.which }} diff --git a/DESCRIPTION b/DESCRIPTION index 1cdb7d4a..a0b2142b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -53,6 +53,6 @@ VignetteBuilder: knitr Description: Tools for multivariate data analysis. Several methods are provided for the analysis (i.e., ordination) of one-table (e.g., principal component analysis, correspondence analysis), two-table (e.g., coinertia analysis, redundancy analysis), three-table (e.g., RLQ analysis) and K-table (e.g., STATIS, multiple coinertia analysis). The philosophy of the package is described in Dray and Dufour (2007) . License: GPL (>= 2) -URL: http://pbil.univ-lyon1.fr/ADE-4/ -BugReports: https://github.com/sdray/ade4/issues +URL: https://adeverse.github.io/ade4/, http://pbil.univ-lyon1.fr/ADE-4/ +BugReports: https://github.com/adeverse/ade4/issues Encoding: UTF-8 diff --git a/NAMESPACE b/NAMESPACE index b7c922be..2ded31bd 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -232,7 +232,7 @@ export("originality") export("haar2level", "mld", "orthobasis.circ", "orthobasis.haar", "orthobasis.line", "orthobasis.mat", "orthobasis.neig", "is.orthobasis") ## ******* spatial ******* -export("area2link", "area2poly", "area.plot", "dist.neig", "gridrowcol", "multispati.randtest", "mstree", "multispati.rtest", "nb2neig", "neig", "neig2mat", "neig2nb", "poly2area", "scores.neig") +export("area2link", "area2poly", "area.plot", "dist.neig", "gridrowcol", "mstree", "nb2neig", "neig", "neig2mat", "neig2nb", "poly2area", "scores.neig") ## ******* misc ********* export("bwca.dpcoa") @@ -276,6 +276,8 @@ export("testertracenubisCpp") ## "plot.multispati" ## "print.multispati" ## "plot.multispati" +## "multispati.randtest" +## "multispati.rtest" ## ******* internal utilities ******* diff --git a/R/ade4-deprecated.R b/R/ade4-deprecated.R index c44a6ec3..16aff3f2 100644 --- a/R/ade4-deprecated.R +++ b/R/ade4-deprecated.R @@ -1199,3 +1199,81 @@ s.match(x$li, x$ls, xax = xax, yax = yax, sub = "Scores and lag scores", csub = 2, clabel = 0.75) } + +"multispati.randtest" <- function (dudi, listw, nrepet = 999, ...) { + + .Deprecated(new="multispati.randtest", package="ade4", + msg="The 'multispati.randtest' function is now deprecated in 'ade4' and will soon be available in the 'adespatial' package.") + + if(!inherits(dudi,"dudi")) stop ("object of class 'dudi' expected") + if(!inherits(listw,"listw")) stop ("object of class 'listw' expected") + if(listw$style!="W") stop ("object of class 'listw' with style 'W' expected") + + "testmultispati"<- function(nrepet, nr, nc, tab, mat, lw, cw) { + .C("testmultispati", + as.integer(nrepet), + as.integer(nr), + as.integer(nc), + as.double(as.matrix(tab)), + as.double(mat), + as.double(lw), + as.double(cw), + inersim=double(nrepet+1), + PACKAGE="ade4")$inersim + } + + tab<- dudi$tab + nr<-nrow(tab) + nc<-ncol(tab) + mat<-spdep::listw2mat(listw) + lw<- dudi$lw + cw<- dudi$cw + if (!(identical(all.equal(lw,rep(1/nrow(tab), nrow(tab))),TRUE))) { + stop ("Not implemented for non-uniform weights") + } + inersim<- testmultispati(nrepet, nr, nc, tab, mat, lw, cw) + inertot<- sum(dudi$eig) + inersim<- inersim/inertot + obs <- inersim[1] + w <- as.randtest(sim = inersim[-1], obs = obs, call = match.call(), ...) + return(w) +} + +"multispati.rtest" <- function (dudi, listw, nrepet = 99, ...) { + + .Deprecated(new="multispati.rtest", package="ade4", + msg="The 'multispati.rtest' function is now deprecated in 'ade4' and will soon be available in the 'adespatial' package.") + + if(!inherits(listw,"listw")) stop ("object of class 'listw' expected") + if(listw$style!="W") stop ("object of class 'listw' with style 'W' expected") + if (!(identical(all.equal(dudi$lw,rep(1/nrow(dudi$tab), nrow(dudi$tab))),TRUE))) { + stop ("Not implemented for non-uniform weights") + } + + n <- length(listw$weights) + fun.lag <- function (x) spdep::lag.listw(listw,x,TRUE) + fun <- function (permuter = TRUE) { + if (permuter) { + permutation <- sample(n) + y <- dudi$tab[permutation,] + yw <- dudi$lw[permutation] + } else { + y <-dudi$tab + yw <- dudi$lw + } + y <- as.matrix(y) + ymoy <- apply(y, 2, fun.lag) + ymoy <- ymoy*yw + y <- y*ymoy + indexmoran <- sum(apply(y,2,sum)*dudi$cw) + return(indexmoran) + } + inertot <- sum(dudi$eig) + obs <- fun (permuter = FALSE)/inertot + if (nrepet == 0) return(obs) + perm <- unlist(lapply(1:nrepet, fun))/inertot + w <- as.randtest(obs = obs, sim = perm, call = match.call(), ...) + return(w) +} + + diff --git a/R/loocv.R b/R/loocv.R index aa43d2b5..d350318c 100644 --- a/R/loocv.R +++ b/R/loocv.R @@ -55,7 +55,7 @@ loocv.between <- function(x, nax = 0, progress = FALSE, parallel = FALSE, ...) ## The original analysis can be any dudi, so wee need to start from dudiCall$call: jcall1 <- dudiCall$call ## Change the df argument to discard row #ind1: - jcall1[[2]] <- data.frame(eval.parent(jcall1[[2]]))[-ind1, , drop = FALSE] + jcall1[[2]] <- data.frame(eval.parent(jcall1[[2]], n = 2))[-ind1, , drop = FALSE] ## Check that the scannf argument is set to FALSE: if (any(names(jcall1) == "scannf")) jcall1[[which(names(jcall1) == "scannf")]] <- FALSE else { diff --git a/R/multispati.randtest.R b/R/multispati.randtest.R deleted file mode 100644 index be4ff2ec..00000000 --- a/R/multispati.randtest.R +++ /dev/null @@ -1,39 +0,0 @@ -"multispati.randtest" <- function (dudi, listw, nrepet = 999, ...) { - - .Deprecated(new="multispati.randtest", package="ade4", - msg="The 'multispati.randtest' function is now deprecated in 'ade4' and will soon be available in the 'adespatial' package.") - - if(!inherits(dudi,"dudi")) stop ("object of class 'dudi' expected") - if(!inherits(listw,"listw")) stop ("object of class 'listw' expected") - if(listw$style!="W") stop ("object of class 'listw' with style 'W' expected") - - "testmultispati"<- function(nrepet, nr, nc, tab, mat, lw, cw) { - .C("testmultispati", - as.integer(nrepet), - as.integer(nr), - as.integer(nc), - as.double(as.matrix(tab)), - as.double(mat), - as.double(lw), - as.double(cw), - inersim=double(nrepet+1), - PACKAGE="ade4")$inersim - } - - tab<- dudi$tab - nr<-nrow(tab) - nc<-ncol(tab) - mat<-spdep::listw2mat(listw) - lw<- dudi$lw - cw<- dudi$cw - if (!(identical(all.equal(lw,rep(1/nrow(tab), nrow(tab))),TRUE))) { - stop ("Not implemented for non-uniform weights") - } - inersim<- testmultispati(nrepet, nr, nc, tab, mat, lw, cw) - inertot<- sum(dudi$eig) - inersim<- inersim/inertot - obs <- inersim[1] - w <- as.randtest(sim = inersim[-1], obs = obs, call = match.call(), ...) - return(w) -} - diff --git a/R/multispati.rtest.R b/R/multispati.rtest.R deleted file mode 100644 index bb55288b..00000000 --- a/R/multispati.rtest.R +++ /dev/null @@ -1,38 +0,0 @@ -"multispati.rtest" <- function (dudi, listw, nrepet = 99, ...) { - - .Deprecated(new="multispati.rtest", package="ade4", - msg="The 'multispati.rtest' function is now deprecated in 'ade4' and will soon be available in the 'adespatial' package.") - - if(!inherits(listw,"listw")) stop ("object of class 'listw' expected") - if(listw$style!="W") stop ("object of class 'listw' with style 'W' expected") - if (!(identical(all.equal(dudi$lw,rep(1/nrow(dudi$tab), nrow(dudi$tab))),TRUE))) { - stop ("Not implemented for non-uniform weights") - } - - n <- length(listw$weights) - fun.lag <- function (x) spdep::lag.listw(listw,x,TRUE) - fun <- function (permuter = TRUE) { - if (permuter) { - permutation <- sample(n) - y <- dudi$tab[permutation,] - yw <- dudi$lw[permutation] - } else { - y <-dudi$tab - yw <- dudi$lw - } - y <- as.matrix(y) - ymoy <- apply(y, 2, fun.lag) - ymoy <- ymoy*yw - y <- y*ymoy - indexmoran <- sum(apply(y,2,sum)*dudi$cw) - return(indexmoran) - } - inertot <- sum(dudi$eig) - obs <- fun (permuter = FALSE)/inertot - if (nrepet == 0) return(obs) - perm <- unlist(lapply(1:nrepet, fun))/inertot - w <- as.randtest(obs = obs, sim = perm, call = match.call(), ...) - return(w) -} - - diff --git a/README.md b/README.md index 7bac4fe9..11ddf8a1 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,33 @@ # [ade4](http://pbil.univ-lyon1.fr/ADE-4/) + [![CRAN_Release_Badge](http://www.r-pkg.org/badges/version-ago/ade4)](http://cran.r-project.org/package=ade4) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/ade4)](https://cran.r-project.org/package=ade4) -[![R-CMD-check](https://github.com/sdray/ade4/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/sdray/ade4/actions/workflows/R-CMD-check.yaml) +[![R-CMD-check](https://github.com/adeverse/ade4/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/adeverse/ade4/actions/workflows/R-CMD-check.yaml) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences -Installing *ade4* -------------- +--------------------------- + +**Please note! Since January 2024, this repository has belonged to the *adeverse* organization.** +To avoid confusion, we strongly recommend updating any existing local clones to point to the new +repository URL. You can do this by using `git remote` on the command line: + +`git remote set-url origin git@github.com:adeverse/ade4.git` + +or -To install the development version from github: +`git remote set-url origin https://github.com/adeverse/ade4.git` -1. Install the release version of `remotes` from CRAN with `install.packages("remotes")`. +--------------------------- -2. Make sure you have a working development environment. + +Installing the development version of `ade4` +------------- + +- Install the release version of `remotes` from CRAN with `install.packages("remotes")`. + +- Make sure you have a working development environment. * **Windows**: Install [Rtools](http://cran.r-project.org/bin/windows/Rtools/). * **Mac**: Install Xcode from the Mac App Store. * **Linux**: Install a compiler and various development libraries (details vary across different flavors of Linux). @@ -21,23 +35,26 @@ To install the development version from github: Then: ```r -remotes::install_github("sdray/ade4") +remotes::install_github("adeverse/ade4") ``` -The stable version can be installed from CRAN using: + +If you do not wish to install the development environments Rtools (Windows) / XCode (Mac), we can supply binary packages of the development version of `ade4` on request. + +You can also find these binary packages as artifacts of GitHub Actions: [here](https://github.com/adeverse/ade4/actions/workflows/build-bin-windows.yaml) for Windows and [here](https://github.com/adeverse/ade4/actions/workflows/build-bin-macOS-x64.yaml) and [here](https://github.com/adeverse/ade4/actions/workflows/build-bin-macOS-M1.yaml) for macOS. + + +Installing the stable version of `ade4` +------------- ```r install.packages("ade4") ``` -Once installed, the package can be loaded using: + +Loading `ade4` +------------- ```r library("ade4") ``` - -If you do not wish to install the development environments Rtools (Windows) / XCode (Mac), you can get the binary packages here: - -* [**Windows**](http://pbil.univ-lyon1.fr/members/thioulouse/bin/windows/) - -* [**macOS**](http://pbil.univ-lyon1.fr/members/thioulouse/bin/macosx/) diff --git a/_pkgdown.yml b/_pkgdown.yml index c0e2470c..a9ba92e8 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -39,8 +39,8 @@ navbar: href: reference/index.html - text: "Ressources" menu: - - text: "ade4 shinyapps" - href: https://lbbe-shiny.univ-lyon1.fr/Reproducible_Research/ShinyADE4/ + - text: "ade4shiny" + href: https://lbbe-shiny.univ-lyon1.fr/ade4shiny/ - text: "FAQ" href: articles/faq.html - text: "adelist" @@ -54,7 +54,7 @@ navbar: icon: fa-leaf href: https://lbbe-web.univ-lyon1.fr/en - icon: fa-github - href: https://github.com/sdray/ade4 + href: https://github.com/adeverse/ade4 reference: @@ -334,8 +334,6 @@ reference: - orthobasis.line - orthobasis.mat - orthobasis.neig - - multispati.randtest - - multispati.rtest - nb2neig - neig - neig2mat diff --git a/man/ade4-deprecated.Rd b/man/ade4-deprecated.Rd index 4c42b99d..13ad920f 100644 --- a/man/ade4-deprecated.Rd +++ b/man/ade4-deprecated.Rd @@ -15,6 +15,8 @@ - \code{freq2genet}: replaced by \code{df2genind} and \code{genind2genpop} in the \code{adegenet} package \cr - \code{fuzzygenet}: replaced by \code{df2genind} in the \code{adegenet} package \cr - \code{multispati}: replaced by \code{multispati} in the \code{adespatial} package \cr + - \code{multispati.rtest} \cr + - \code{multispati.randtest} \cr - \code{optimEH}: replaced by \code{optimEH} in the \code{adiv} package \cr - \code{orisaved}: replaced by \code{orisaved} in the \code{adiv} package \cr - \code{orthogram}: replaced by \code{orthogram} in the \code{adephylo} package \cr diff --git a/man/aminoacyl.Rd b/man/aminoacyl.Rd index ed863d78..ca1487c1 100644 --- a/man/aminoacyl.Rd +++ b/man/aminoacyl.Rd @@ -19,8 +19,7 @@ } } \source{ - Data prepared by D. Charif \email{Delphine.Charif@versailles.inra.fr} starting from:\cr - \url{http://www.expasy.org/sprot/} + Data prepared by D. Charif \email{Delphine.Charif@versailles.inra.fr} } \references{ Chiapello H., Olivier E., Landes-Devauchelle C., Nitschké P. and Risler J.L (1999) diff --git a/man/apis108.Rd b/man/apis108.Rd index fa11493d..5f2d5fca 100644 --- a/man/apis108.Rd +++ b/man/apis108.Rd @@ -11,8 +11,6 @@ A data frame containing 180 rows (allelic forms on 8 loci) and 10 columns (popul Nimba, Celinda, Pretoria, Chalkidiki, Forli, Valenciennes, Umea and Seville). } \source{ -\url{https://www1.montpellier.inra.fr/URLB/apis/libanfreq.pdf}\cr - Franck P., Garnery L., Solignac M. and Cornuet J.M. (2000) Molecular confirmation of a fourth lineage in honeybees from the Near-East. \emph{Apidologie}, \bold{31}, 167--180. } diff --git a/man/kcponds.Rd b/man/kcponds.Rd index e57943ec..c7ba212b 100644 --- a/man/kcponds.Rd +++ b/man/kcponds.Rd @@ -30,8 +30,7 @@ divMI (diversity macroinvertebrates) \source{ Cottenie, K. (2002) Local and regional processes in a zooplankton metacommunity. - PhD, Katholieke Universiteit Leuven, Leuven, Belgium. \cr - \url{https://bio.kuleuven.be/eco/phdkarlcottenie.pdf} + PhD, Katholieke Universiteit Leuven, Leuven, Belgium. } \examples{ diff --git a/man/meau.Rd b/man/meau.Rd index 9a6f2fd5..7a91a2b1 100644 --- a/man/meau.Rd +++ b/man/meau.Rd @@ -11,7 +11,7 @@ and Ephemeroptera Species. \code{meau} is a list of 3 components. \describe{ \item{env}{is a data frame with 24 sites and 10 physicochemical variables.} - \item{fau}{is a data frame with 24 sites and 13 Ephemeroptera Species.} + \item{spe}{is a data frame with 24 sites and 13 Ephemeroptera Species.} \item{design}{is a data frame with 24 sites and 2 factors. \itemize{ \item \code{season}: is a factor with 4 levels = seasons. diff --git a/man/meaudret.Rd b/man/meaudret.Rd index d772af0b..7701c24f 100644 --- a/man/meaudret.Rd +++ b/man/meaudret.Rd @@ -11,7 +11,7 @@ and Ephemeroptera Species. \code{meaudret} is a list of 4 components. \describe{ \item{env}{is a data frame with 20 sites and 9 variables.} - \item{fau}{is a data frame with 20 sites and 13 Ephemeroptera Species.} + \item{spe}{is a data frame with 20 sites and 13 Ephemeroptera Species.} \item{design}{is a data frame with 20 sites and 2 factors. \itemize{ \item \code{season} is a factor with 4 levels = seasons. diff --git a/man/multispati.randtest.Rd b/man/multispati.randtest.Rd deleted file mode 100644 index ded74306..00000000 --- a/man/multispati.randtest.Rd +++ /dev/null @@ -1,47 +0,0 @@ -\name{multispati.randtest} -\alias{multispati.randtest} -\title{Multivariate spatial autocorrelation test (in C)} -\description{ -This function is now deprecated in 'ade4' and will soon be available in the 'adespatial' package. -This function performs a multivariate autocorrelation test. -} -\usage{ -multispati.randtest(dudi, listw, nrepet = 999, ...) -} -\arguments{ - \item{dudi}{an object of class \code{dudi} for the duality diagram analysis} - \item{listw}{an object of class \code{listw} for the spatial dependence of data observations} - \item{nrepet}{the number of permutations} - \item{\dots}{further arguments passed to or from other methods} -} -\details{ -We note X the data frame with the variables, Q the column weights matrix -and D the row weights matrix associated to the duality diagram \emph{dudi}. -We note L the neighbouring weights matrix associated to \emph{listw}. -This function performs a Monte-Carlo Test on the multivariate spatial -autocorrelation index : \deqn{r = \frac{trace(X^{t}DLXQ)}{trace(X^{t}DXQ)}}{r = trace(t(X)DLXQ) / trace(t(X)DXQ)} -} -\value{ -Returns an object of class \code{randtest} (randomization tests). -} -\references{ -Smouse, P. E. and Peakall, R. (1999) Spatial autocorrelation analysis of individual multiallele and multilocus genetic structure. -\emph{Heredity}, \bold{82}, 561--573. -} -\author{Daniel Chessel \cr -Sébastien Ollier \email{sebastien.ollier@u-psud.fr} -} -\seealso{\code{\link{dudi}},\code{\link[spdep]{mat2listw}}} -\examples{ -if (requireNamespace("spdep", quietly = TRUE) & requireNamespace("adespatial", quietly = TRUE)) { - data(mafragh) - maf.listw <- spdep::nb2listw(mafragh$nb) - maf.pca <- dudi.pca(mafragh$env, scannf = FALSE) - multispati.randtest(maf.pca, maf.listw) - maf.pca.ms <- adespatial::multispati(maf.pca, maf.listw, scannf = FALSE) - plot(maf.pca.ms) -} -} -\keyword{multivariate} -\keyword{spatial} -\keyword{nonparametric} diff --git a/man/multispati.rtest.Rd b/man/multispati.rtest.Rd deleted file mode 100644 index 26bea56f..00000000 --- a/man/multispati.rtest.Rd +++ /dev/null @@ -1,47 +0,0 @@ -\name{multispati.rtest} -\alias{multispati.rtest} -\title{Multivariate spatial autocorrelation test} -\description{ -This function is now deprecated in 'ade4' and will soon be available in the 'adespatial' package. -This function performs a multivariate autocorrelation test. -} -\usage{ -multispati.rtest(dudi, listw, nrepet = 99, ...) -} -\arguments{ - \item{dudi}{an object of class \code{dudi} for the duality diagram analysis} - \item{listw}{an object of class \code{listw} for the spatial dependence of data observations} - \item{nrepet}{the number of permutations} - \item{\dots}{further arguments passed to or from other methods} -} -\details{ -We note X the data frame with the variables, Q the column weight matrix -and D the row weight matrix associated to the duality diagram \emph{dudi}. -We note L the neighbouring weights matrix associated to \emph{listw}. -This function performs a Monte-Carlo Test on the multivariate spatial -autocorrelation index : \deqn{r = \frac{X^{t}DLXQ}{X^{t}DXQ}}{r = t(X)DLXQ / t(X)DXQ} -} -\value{ -Returns an object of class \code{randtest} (randomization tests). -} -\references{ -Smouse, P. E. and Peakall, R. (1999) Spatial autocorrelation analysis of individual multiallele and multilocus genetic structure. -\emph{Heredity}, \bold{82}, 561--573. -} -\author{Daniel Chessel \cr -Sébastien Ollier \email{sebastien.ollier@u-psud.fr} -} -\seealso{\code{\link{dudi}},\code{\link[spdep]{mat2listw}}} -\examples{ -if (requireNamespace("spdep", quietly = TRUE) & requireNamespace("adespatial", quietly = TRUE)) { - data(mafragh) - maf.listw <- spdep::nb2listw(mafragh$nb) - maf.pca <- dudi.pca(mafragh$env, scannf = FALSE) - multispati.rtest(maf.pca, maf.listw) - maf.pca.ms <- adespatial::multispati(maf.pca, maf.listw, scannf = FALSE) - plot(maf.pca.ms) -} -} -\keyword{multivariate} -\keyword{spatial} -\keyword{nonparametric} diff --git a/man/newick.eg.Rd b/man/newick.eg.Rd index fee5ff2d..af994ae8 100644 --- a/man/newick.eg.Rd +++ b/man/newick.eg.Rd @@ -10,8 +10,7 @@ This data set contains various exemples of phylogenetic trees in Newick format. \code{newick.eg} is a list containing 14 character strings in Newick format. } \source{ -Trees 1 to 7 were obtained from the URL \cr -\url{http://evolution.genetics.washington.edu/phylip/newicktree.html}. +Trees 1 to 7 were obtained from the phylip software. Trees 8 and 9 were obtained by Clémentine Carpentier-Gimaret. diff --git a/man/newick2phylog.Rd b/man/newick2phylog.Rd index 8115a7fe..93f35374 100644 --- a/man/newick2phylog.Rd +++ b/man/newick2phylog.Rd @@ -15,8 +15,8 @@ taxo2phylog(taxo, add.tools = FALSE, root="Root", abbrev=TRUE) newick2phylog.addtools(res, tol = 1e-07) } \arguments{ - \item{x.tre}{a character string corresponding to a phylogenetic tree in Newick format\cr - (\url{http://evolution.genetics.washington.edu/phylip/newicktree.html})} + \item{x.tre}{a character string corresponding to a phylogenetic tree in Newick format + (see the phylip software)} \item{add.tools}{if TRUE, executes the function \code{newick2phylog.addtools}} \item{call}{call} \item{hc}{an object of class \code{hclust}} diff --git a/man/varipart.Rd b/man/varipart.Rd index f0b5f2fd..4bda135b 100644 --- a/man/varipart.Rd +++ b/man/varipart.Rd @@ -16,7 +16,7 @@ variables). By default, no covariables are considered (\code{W} is \code{NULL}) \item{nrepet}{an integer indicating the number of permutations .} -\item{type}{a character specifying the algorithm which should be used to adjust R-squared (either \code{"simulated"} or \ code{"parametric"}).} +\item{type}{a character specifying the algorithm which should be used to adjust R-squared (either \code{"simulated"} or \code{"parametric"}).} \item{scale}{If \code{Y} is not a dudi, a \code{logical} indicating if variables should be scaled} diff --git a/pkgdown/index.md b/pkgdown/index.md index 711720d0..e131cc58 100644 --- a/pkgdown/index.md +++ b/pkgdown/index.md @@ -1,7 +1,7 @@ # Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences (**ade4**) -[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/ade4)](http://cran.r-project.org/package=ade4) +[![CRAN_Release_Badge](http://www.r-pkg.org/badges/version-ago/ade4)](http://cran.r-project.org/package=ade4) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/ade4)](https://cran.r-project.org/package=ade4) -[![R-CMD-check](https://github.com/sdray/ade4/workflows/R-CMD-check/badge.svg)](https://github.com/sdray/ade4/actions) +[![R-CMD-check](https://github.com/adeverse/ade4/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/adeverse/ade4/actions/workflows/R-CMD-check.yaml) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ## Presentation @@ -10,14 +10,16 @@ **ade4** is a package for the [**R** software](https://www.r-project.org) since 2002. It contains functions for exploratory multivariate data analysis and graphical display, many numerical data sets and bibliographic references. Simple one-table methods are described in [Chessel et al. (2004)](http://pbil.univ-lyon1.fr/JTHome/ref/ade4-Rnews.pdf). Two-table and K-table methods are described in [Dray et al. (2007)](http://pbil.univ-lyon1.fr/ade4/article/rnews2/rnews2.pdf). The theory of the duality diagram and its implementation in ade4 are discussed in [Dray et Dufour (2007)](http://pbil.univ-lyon1.fr/ade4/article/jss/jss.pdf). -A book in the *Springer Series in Statistics* collection, [**"Multivariate Analysis of Ecological Data with ade4"**](http://sdray.github.io/ade4/articles/book.html) presents the package. The examples and the graphs in this book can be [**reproduced online here**](https://lbbe-shiny.univ-lyon1.fr/Reproducible_Research/Book/). +A book in the *Springer Series in Statistics* collection, [**"Multivariate Analysis of Ecological Data with ade4"**](http://adeverse.github.io/ade4/articles/book.html) presents the package. The examples and the graphs in this book can be [**reproduced online here**](https://lbbe-shiny.univ-lyon1.fr/Reproducible_Research/Book/). -If you use **ade4**, please consider citing [these references](http://sdray.github.io/ade4/authors.html#citation) ! +The **ade4shiny** dashboard allows you to use the basic functions of the **ade4** package online, directly in your browser: no need to install **R** and the necessary packages on your computer. [**ade4shiny**](https://lbbe-shiny.univ-lyon1.fr/ade4shiny/) + +If you use **ade4**, please consider citing [these references](http://adeverse.github.io/ade4/authors.html#citation) !

- - + +