From noreply at r-forge.r-project.org Fri Jun 6 08:48:05 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 6 Jun 2014 08:48:05 +0200 (CEST) Subject: [Vegan-commits] r2871 - pkg/ordiconsensus Message-ID: <20140606064805.88D41186EFA@r-forge.r-project.org> Author: gblanchet Date: 2014-06-06 08:48:05 +0200 (Fri, 06 Jun 2014) New Revision: 2871 Modified: pkg/ordiconsensus/DESCRIPTION Log: change license of ordiconsensus Modified: pkg/ordiconsensus/DESCRIPTION =================================================================== --- pkg/ordiconsensus/DESCRIPTION 2014-05-15 09:28:48 UTC (rev 2870) +++ pkg/ordiconsensus/DESCRIPTION 2014-06-06 06:48:05 UTC (rev 2871) @@ -8,4 +8,4 @@ Description: This package include function to calculate a consensus of canonical redundancy analyses performed using different association coefficients Depends: vegan Suggests: FactoMineR -License: Unlimited +License: GPL-2 From noreply at r-forge.r-project.org Fri Jun 6 12:21:43 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 6 Jun 2014 12:21:43 +0200 (CEST) Subject: [Vegan-commits] r2872 - in pkg/ordiconsensus: . man Message-ID: <20140606102143.1F0CA184F97@r-forge.r-project.org> Author: gblanchet Date: 2014-06-06 12:21:42 +0200 (Fri, 06 Jun 2014) New Revision: 2872 Modified: pkg/ordiconsensus/DESCRIPTION pkg/ordiconsensus/man/coeffCompare.Rd pkg/ordiconsensus/man/consensusRDA.Rd pkg/ordiconsensus/man/simulSADcomm.Rd Log: ordiconsensus is now CRAN ready... I hope Modified: pkg/ordiconsensus/DESCRIPTION =================================================================== --- pkg/ordiconsensus/DESCRIPTION 2014-06-06 06:48:05 UTC (rev 2871) +++ pkg/ordiconsensus/DESCRIPTION 2014-06-06 10:21:42 UTC (rev 2872) @@ -1,11 +1,13 @@ Package: ordiconsensus Type: Package Title: Consensus of canonical ordinations through the canonical redundancy analysis -Version: 0.4 +Version: 1.0 Date: 2012-11-09 Author: F. Guillaume Blanchet Maintainer: F. Guillaume Blanchet -Description: This package include function to calculate a consensus of canonical redundancy analyses performed using different association coefficients Depends: vegan Suggests: FactoMineR -License: GPL-2 +Description: This package include function to calculate a consensus of canonical redundancy analyses performed using different association coefficients +License: GPL (>= 2) +Repository/R-Forge/Project: vegan +NeedsCompilation: no Modified: pkg/ordiconsensus/man/coeffCompare.Rd =================================================================== --- pkg/ordiconsensus/man/coeffCompare.Rd 2014-06-06 06:48:05 UTC (rev 2871) +++ pkg/ordiconsensus/man/coeffCompare.Rd 2014-06-06 10:21:42 UTC (rev 2872) @@ -67,22 +67,31 @@ ordiRes[[4]]<-rda(chisq~.,data=beetle.expl) ### db-RDA Bray-Curtis -ordiRes[[5]]<-capscale(sqrt(vegdist(beetle,method="bray"))~.,data=beetle.expl,comm=beetle) +bray<-sqrt(vegdist(beetle,method="bray")) +ordiRes[[5]]<-capscale(bray~.,data=beetle.expl,comm=beetle) ### db-RDA square-root Bray-Curtis -ordiRes[[6]]<-capscale(sqrt(vegdist(beetle^0.5,method="bray"))~.,data=beetle.expl,comm=beetle) +bray.sqrt<-sqrt(vegdist(beetle^0.5,method="bray")) +ordiRes[[6]]<-capscale(bray.sqrt~.,data=beetle.expl,comm=beetle^0.5) ### db-RDA fourth-root Bray-Curtis -ordiRes[[7]]<-capscale(sqrt(vegdist(beetle^0.25,method="bray"))~.,data=beetle.expl,comm=beetle) +bray.fort<-sqrt(vegdist(beetle^0.25,method="bray")) +ordiRes[[7]]<-capscale(bray.fort~.,data=beetle.expl,comm=beetle^0.25) ### db-RDA modified Gower log 2 -ordiRes[[8]]<-capscale(vegdist(decostand(beetle, "log",logbase=2), "altGower")~.,data=beetle.expl,comm=beetle) ### Warning message stem from log transformation of 0 +beetleLog2<-decostand(beetle, "log",logbase=2) +mGowerLog2<-vegdist(beetleLog2, "altGower") +ordiRes[[8]]<-capscale(mGowerLog2~.,data=beetle.expl,comm=beetleLog2) ### db-RDA modified Gower log 5 -ordiRes[[9]]<-capscale(vegdist(decostand(beetle, "log",logbase=5), "altGower")~.,data=beetle.expl,comm=beetle) ### Warning message stem from log transformation of 0 +beetleLog5<-decostand(beetle, "log",logbase=5) +mGowerLog5<-vegdist(beetleLog5, "altGower") +ordiRes[[9]]<-capscale(mGowerLog5~.,data=beetle.expl,comm=beetleLog5) ### db-RDA modified Gower log 10 -ordiRes[[10]]<-capscale(vegdist(decostand(beetle, "log",logbase=10), "altGower")~.,data=beetle.expl,comm=beetle) ### Warning message stem from log transformation of 0 +beetleLog10<-decostand(beetle, "log",logbase=10) +mGowerLog10<-vegdist(beetleLog10, "altGower") +ordiRes[[10]]<-capscale(mGowerLog10~.,data=beetle.expl,comm=beetleLog10) ### Compare association coefficients AssoComp<-coeffCompare(ordiRes,rep(7,ndis)) @@ -91,7 +100,8 @@ ### Draw a graphic to visualize the comparison #--------------------------------------------- ### Name of association coefficient compared -name<-c("Species profiles","Chord","Hellinger","Chi2","Bray-Curtis","(Bray-Curtis)^0.5","(Bray-Curtis)^0.25","mGowerlog2","mGowerlog5","mGowerlog10") +name<-c("Species profiles","Chord","Hellinger","Chi2","Bray-Curtis", +"(Bray-Curtis)^0.5","(Bray-Curtis)^0.25","mGowerlog2","mGowerlog5","mGowerlog10") plot(AssoComp$mst,type="t",labels=name,xlab="",ylab="",main="MST Sites scores") Modified: pkg/ordiconsensus/man/consensusRDA.Rd =================================================================== --- pkg/ordiconsensus/man/consensusRDA.Rd 2014-06-06 06:48:05 UTC (rev 2871) +++ pkg/ordiconsensus/man/consensusRDA.Rd 2014-06-06 10:21:42 UTC (rev 2872) @@ -71,44 +71,61 @@ ordiRes[[3]]<-rda(hell~.,data=beetle.expl) ### db-RDA Bray-Curtis -ordiRes[[4]]<-capscale(sqrt(vegdist(beetle,method="bray"))~.,data=beetle.expl,comm=beetle) +bray<-sqrt(vegdist(beetle,method="bray")) +ordiRes[[4]]<-capscale(bray~.,data=beetle.expl,comm=beetle) ### db-RDA square-root Bray-Curtis -ordiRes[[5]]<-capscale(sqrt(vegdist(beetle^0.5,method="bray"))~.,data=beetle.expl,comm=beetle^0.5) +bray.sqrt<-sqrt(vegdist(beetle^0.5,method="bray")) +ordiRes[[5]]<-capscale(bray.sqrt~.,data=beetle.expl,comm=beetle^0.5) ### db-RDA fourth-root Bray-Curtis -ordiRes[[6]]<-capscale(sqrt(vegdist(beetle^0.25,method="bray"))~.,data=beetle.expl,comm=beetle^0.25) +bray.fort<-sqrt(vegdist(beetle^0.25,method="bray")) +ordiRes[[6]]<-capscale(bray.fort~.,data=beetle.expl,comm=beetle^0.25) ### db-RDA modified Gower log 2 -ordiRes[[7]]<-capscale(vegdist(decostand(beetle, "log",logbase=2), "altGower")~.,data=beetle.expl,comm=decostand(beetle, "log",logbase=2)) ### Warning message stem from log transformation of 0 +beetleLog2<-decostand(beetle, "log",logbase=2) +mGowerLog2<-vegdist(beetleLog2, "altGower") +ordiRes[[7]]<-capscale(mGowerLog2~.,data=beetle.expl,comm=beetleLog2) ### db-RDA modified Gower log 5 -ordiRes[[8]]<-capscale(vegdist(decostand(beetle, "log",logbase=5), "altGower")~.,data=beetle.expl,comm=decostand(beetle, "log",logbase=5)) ### Warning message stem from log transformation of 0 +beetleLog5<-decostand(beetle, "log",logbase=5) +mGowerLog5<-vegdist(beetleLog5, "altGower") +ordiRes[[8]]<-capscale(mGowerLog5~.,data=beetle.expl,comm=beetleLog5) ### db-RDA modified Gower log 10 -ordiRes[[9]]<-capscale(vegdist(decostand(beetle, "log",logbase=10), "altGower")~.,data=beetle.expl,comm=decostand(beetle, "log",logbase=10)) ### Warning message stem from log transformation of 0 +beetleLog10<-decostand(beetle, "log",logbase=10) +mGowerLog10<-vegdist(beetleLog10, "altGower") +ordiRes[[9]]<-capscale(mGowerLog10~.,data=beetle.expl,comm=beetleLog10) #---------------- ### Test RDA axis #---------------- ordiResTest<-vector("list",length=ndis) +\dontrun{ for(i in 1:ndis){ - ordiResTest[[i]]<-anova.cca(ordiRes[[i]],by="axis",cutoff=0.1) + ordiResTest[[i]]<-anova.cca(ordiRes[[i]],by="axis",cutoff=0.1,perm.max=100) } +} +ordiResTest<-c(3,3,4,4,4,4,3,4,4) ## This output is an alternative to the previous code + + ### Consensus RDA consRDA<-consensusRDA(ordiRes,ordiResTest,beetle,beetle.expl) summary(consRDA) -axisLabels<-c(paste("Axis 1 - ",round(consRDA$values[1]/sum(consRDA$values),4)*100,sep=""),paste("Axis 2 - ",round(consRDA$values[2]/sum(consRDA$values),4)*100,sep="")) +XaxisLabels<-paste("Axis 1 - ",round(consRDA$values[1]/sum(consRDA$values),4)*100,sep="") +YaxisLabels<-paste("Axis 2 - ",round(consRDA$values[2]/sum(consRDA$values),4)*100,sep="") -plot(consRDA$siteConsensus[,1:2],pch=19,xlab=axisLabels[1],ylab=axisLabels[2],las=1) +plot(consRDA$siteConsensus[,1:2],pch=19,xlab=XaxisLabels,ylab=YaxisLabels,las=1) abline(h=0,v=0,lty=3) -arrows(0,0,consRDA$spConsensus[,1]*10,consRDA$spConsensus[,2]*10,col="red",length=0.1,angle=12) +arrows(0,0,consRDA$spConsensus[,1]*10,consRDA$spConsensus[,2]*10, + col="red",length=0.1,angle=12) text(consRDA$spConsensus[,1:2]*10,labels=rownames(consRDA$spConsensus),col="red") -arrows(0,0,consRDA$descConsensus[,1]*0.4,consRDA$descConsensus[,2]*0.4,col="blue",length=0.1,angle=12) +arrows(0,0,consRDA$descConsensus[,1]*0.4,consRDA$descConsensus[,2]*0.4, + col="blue",length=0.1,angle=12) text(consRDA$descConsensus[,1:2]*0.4,labels=rownames(consRDA$descConsensus),col="blue") } Modified: pkg/ordiconsensus/man/simulSADcomm.Rd =================================================================== --- pkg/ordiconsensus/man/simulSADcomm.Rd 2014-06-06 06:48:05 UTC (rev 2871) +++ pkg/ordiconsensus/man/simulSADcomm.Rd 2014-06-06 10:21:42 UTC (rev 2872) @@ -6,7 +6,9 @@ \description{ This function simulates community matrices with the same species abundance distribution following patterns defined by a set of explanatory variables. This function was used to simulate community matrices in Blanchet et al. (In press)} \usage{ -simulSADcomm(sp.abund, expl.var, expl.rand.sel = TRUE, nexpl.comb = 2, binary = FALSE, fix.expl = NULL, nsite = 50, weight = NULL, range.weight = c(0, 2), sd.expl = FALSE, norm = c(0, 1)) +simulSADcomm(sp.abund, expl.var, expl.rand.sel = TRUE, nexpl.comb = 2, + binary = FALSE, fix.expl = NULL, nsite = 50, weight = NULL, + range.weight = c(0, 2), sd.expl = FALSE, norm = c(0, 1)) } \arguments{ \item{sp.abund}{ From noreply at r-forge.r-project.org Fri Jun 6 15:00:17 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 6 Jun 2014 15:00:17 +0200 (CEST) Subject: [Vegan-commits] r2873 - in pkg/ordiconsensus: . R man Message-ID: <20140606130017.61ADF186DF0@r-forge.r-project.org> Author: gblanchet Date: 2014-06-06 15:00:16 +0200 (Fri, 06 Jun 2014) New Revision: 2873 Modified: pkg/ordiconsensus/DESCRIPTION pkg/ordiconsensus/R/SADbin.R pkg/ordiconsensus/man/RV.Rd pkg/ordiconsensus/man/SADbin.Rd pkg/ordiconsensus/man/beetle.Rd pkg/ordiconsensus/man/coeffCompare.Rd pkg/ordiconsensus/man/consensusRDA.Rd pkg/ordiconsensus/man/ordiconsensus-package.Rd pkg/ordiconsensus/man/simulSADcomm.Rd Log: polish the doc of ordiconsensus Modified: pkg/ordiconsensus/DESCRIPTION =================================================================== --- pkg/ordiconsensus/DESCRIPTION 2014-06-06 10:21:42 UTC (rev 2872) +++ pkg/ordiconsensus/DESCRIPTION 2014-06-06 13:00:16 UTC (rev 2873) @@ -7,7 +7,7 @@ Maintainer: F. Guillaume Blanchet Depends: vegan Suggests: FactoMineR -Description: This package include function to calculate a consensus of canonical redundancy analyses performed using different association coefficients +Description: This package include functions to calculate a consensus of canonical redundancy analyses performed using different association coefficients License: GPL (>= 2) Repository/R-Forge/Project: vegan NeedsCompilation: no Modified: pkg/ordiconsensus/R/SADbin.R =================================================================== --- pkg/ordiconsensus/R/SADbin.R 2014-06-06 10:21:42 UTC (rev 2872) +++ pkg/ordiconsensus/R/SADbin.R 2014-06-06 13:00:16 UTC (rev 2873) @@ -11,8 +11,13 @@ ### copyleft - Guillaume Blanchet - August 2008 ################################################################## method<-match.arg(method) + "%w/o%" <- function(x,y) x[!x %in% y] #-- x without y - "%w/o%" <- function(x,y) x[!x %in% y] #-- x without y + #CC# General check + if(any(data!=round(data))){ + stop("'data' should only include integer values") + } + #CC# Find the number of class to be used spmax<-max(data) Modified: pkg/ordiconsensus/man/RV.Rd =================================================================== --- pkg/ordiconsensus/man/RV.Rd 2014-06-06 10:21:42 UTC (rev 2872) +++ pkg/ordiconsensus/man/RV.Rd 2014-06-06 13:00:16 UTC (rev 2873) @@ -16,7 +16,7 @@ \item{Y}{A matrix with the same number of rows as \code{X}} } \details{ - \code{RV} calculates the RV coefficient between two matrices.The RV coefficient is a multivariate generalization of the Pearson's correlation. The package \pkg{FactoMineR} offers a much more complete version of the RV coefficient (\code{\link[FactoMineR]{coeffRV}}). This function was designed to calculate only the RV coefficient making it much faster than \code{\link[FactoMineR]{coeffRV}}. + \code{RV} calculates the RV coefficient between two matrices.The RV coefficient is a multivariate generalization of the squared Pearson's correlation. In package \pkg{FactoMineR}, the function \code{\link[FactoMineR]{coeffRV}} calculates other variations of the RV coefficient and propose a test for it. This function was designed to calculate only the basic RV coefficient making it much faster than \code{\link[FactoMineR]{coeffRV}}. } \value{ The RV coefficient. A numeric value ranging between 0 and 1 Modified: pkg/ordiconsensus/man/SADbin.Rd =================================================================== --- pkg/ordiconsensus/man/SADbin.Rd 2014-06-06 10:21:42 UTC (rev 2872) +++ pkg/ordiconsensus/man/SADbin.Rd 2014-06-06 13:00:16 UTC (rev 2873) @@ -4,7 +4,7 @@ Species-abundance distribution (SAD) bins } \description{ -This function constructs bins for a species-abundance distribution. The function was designed so that every variation of bins can easily be constructed. +This function constructs bins for a species-abundance distribution. It was designed so that every variation of binnings can easily be constructed. } \usage{ SADbin(data, method = c("log", "modlog", "modhalflog"), base = 2) @@ -18,7 +18,7 @@ A character string defining which binning method to use. } \item{base}{ -The logarithm base used to perform the binning +The log base to use to perform the binning. } } \details{ @@ -30,7 +30,7 @@ modlog (using a base = 2) : Bin 1 = 1, Bin 2 = 2-3, Bin 3 = 4-7, Bin 4 = 8-15,... -modhalflog (using a base = 2) : Bin 1 = half the number of species with 1 individuals, Bin 2 = half the number of species with 2 individuals, all species with 3 individuals and half the number of species with 4 individuals, Bin 3 = 4-8, abundances that fall exactly on the boundary are divided equally between the given bin and the next lower bin, and so on. +modhalflog (using a base = 2) : Bin 1 = half the number of species with 1 individuals, Bin 2 = half the number of species with 1 individuals and half of the number of species with 2 individuals, Bin 3 = half of the number of species with 2 individuals, all species with 3 individuals and half of the number of species with 4 individuals; and so on. } \value{ Modified: pkg/ordiconsensus/man/beetle.Rd =================================================================== --- pkg/ordiconsensus/man/beetle.Rd 2014-06-06 10:21:42 UTC (rev 2872) +++ pkg/ordiconsensus/man/beetle.Rd 2014-06-06 13:00:16 UTC (rev 2873) @@ -53,7 +53,7 @@ \item{\code{Trecapic}}{\emph{Trechus apicalis}} \item{\code{Trecchal}}{\emph{Trechus chalybeus}} -The \code{beetle.expl} data set is a data frame that contains the relative basal area of the 25 trees closest to the center of each sampling site. The relative basal area is presented by tree species. +The \code{beetle.expl} data set is a data frame that contains the relative basal area of the 25 trees closest to the center of each sampled site. The relative basal area is presented by tree species. \item{\code{Pt}}{Aspen (\emph{Populus tremuloides})} \item{\code{Bp}}{White birch (\emph{Betula papyrifera})} Modified: pkg/ordiconsensus/man/coeffCompare.Rd =================================================================== --- pkg/ordiconsensus/man/coeffCompare.Rd 2014-06-06 10:21:42 UTC (rev 2872) +++ pkg/ordiconsensus/man/coeffCompare.Rd 2014-06-06 13:00:16 UTC (rev 2873) @@ -1,9 +1,9 @@ \name{coeffCompare} \alias{coeffCompare} -\title{ Compare dissimilarities used within the RDA framework} +\title{Compare dissimilarities used within the RDA framework} \description{ - This function compares association coefficients used through the RDA framework with a minimum spanning tree. It was designed to compare how information explained by one dissimilarity coefficient diverge from the information explained by another. The comparison is made simultaneously on the site scores, the species scores and the canonical coefficients. + This function compares association coefficients used through the RDA framework with a minimum spanning tree. It was designed to compare how information explained by one dissimilarity coefficient diverge from the information explained by another. The comparison is made simultaneously on the sites scores, the species scores and the canonical coefficients. } \usage{ coeffCompare(ordires, ordisigniaxis, pval = 0.05) @@ -11,23 +11,23 @@ \arguments{ \item{ordires}{ - A list of \code{\link[vegan]{rda}} or \code{\link[vegan]{capscale}} result object that includes a series of RDA or distance-based RDA (dbRDA) performed with different association coefficients on the same data. + A list of \code{\link[vegan]{rda}} or \code{\link[vegan]{capscale}} result object that includes a series of RDA or distance-based RDA (db-RDA) performed with different association coefficients on the same data. } \item{ordisigniaxis}{ - A list of \code{\link[vegan]{anova.cca}} object where each axis was tested for each RDA (or dbRDA) in \code{ordires}. This argument can also be a vector defining the number of significant axes in the RDA. See details. + A list of \code{\link[vegan]{anova.cca}} object where each axis of each RDA (or db-RDA) given in \code{ordires} was tested for significance. This argument can also be a vector defining the number of significant axes in each RDA. See details. } \item{pval}{ Numeric. P-value threshold to select the number of axes to use. This argument is only active if a list of \code{\link[vegan]{anova.cca}} object is given for the argument \code{ordisigniaxis}, otherwise it is not considered. Default is 0.05. } } \details{ -For the argument \code{ordisigniaxis}, if a vector of number of significant axes is given, it is assumed that the significant axes are selected in sequential order from the first axis. -The comparison made here rely on the RV coefficient \code{\link{RV}}, a multivariate generalization of the Pearson's correlation where matrix with the same number of rows are compared. +For the argument \code{ordisigniaxis}, if a vector defining the number of significant axes is given, it is assumed that the significant axes are selected in sequential order from the first axis. +The comparison made here rely on the RV coefficient \code{\link{RV}}, a multivariate generalization of the squared Pearson's correlation where matrix with the same number of rows are compared. \code{coeffCompare} should be used prior to using \code{\link{consensusRDA}} because it informs the user about the different association coefficients considered interesting to perform a consensus RDA. An association coefficient presenting results too different from the others should not be included in the consensus RDA, it should be considered apart or discarded. } \value{ -\item{RVmat}{A matrix of RV coefficients calculated from the sites scores matrices of RDA for all pairs of association coefficients} -\item{mst}{minimum spanning tree calculated on (1-siteRVmat)} +\item{RVmat}{A resemblance matrix of RV coefficients calculated from the sites scores matrices of RDA for all pairs of association coefficients.} +\item{mst}{minimum spanning tree calculated on (1-siteRVmat).} } \author{ F. Guillaume Blanchet Modified: pkg/ordiconsensus/man/consensusRDA.Rd =================================================================== --- pkg/ordiconsensus/man/consensusRDA.Rd 2014-06-06 10:21:42 UTC (rev 2872) +++ pkg/ordiconsensus/man/consensusRDA.Rd 2014-06-06 13:00:16 UTC (rev 2873) @@ -4,7 +4,7 @@ Calculates a consensus RDA } \description{ -Calculates a consensus RDA. That is a consensus of a series of RDA performed on the same data using different association coefficients. +Calculates a consensus RDA. That is, a consensus for a series of RDA performed on the same data using different association coefficients. } \usage{ consensusRDA(ordires, ordisigniaxis, resp.var, expl.var, pval = 0.05, scaling = 2) @@ -12,33 +12,33 @@ %- maybe also 'usage' for other objects documented here. \arguments{ \item{ordires}{ - A list of \code{\link[vegan]{rda}} or \code{\link[vegan]{capscale}} result object that includes a series of RDA or distance-based RDA (dbRDA) performed with different association coefficients on the same data. + A list of \code{\link[vegan]{rda}} or \code{\link[vegan]{capscale}} result object that includes a series of RDA or distance-based RDA (db-RDA) performed with different association coefficients on the same data. } \item{ordisigniaxis}{ - A list of \code{\link[vegan]{anova.cca}} object where each axis was tested for each RDA (or dbRDA) in \code{ordires}. This argument can also be a vector defining the number of significant axes in the RDA. See details. + A list of \code{\link[vegan]{anova.cca}} object where each axis of each RDA (or db-RDA) given in \code{ordires} was tested for significance. This argument can also be a vector defining the number of significant axes in each RDA. See details. } \item{resp.var}{ - A matrix of the response variables (species) used to construct all the RDA (or dbRDA) in \code{ordires}. + A matrix of the response variables (species) used to construct all the RDAs (or db-RDAs) in \code{ordires}. } \item{expl.var}{ - A matrix of the explanatory variables used to construct all the RDA (or dbRDA) in \code{ordires}. + A matrix of the explanatory variables used to construct all the RDAs (or db-RDAs) in \code{ordires}. } \item{pval}{ Numeric. P-value threshold to select the number of axes to use. This argument is only active if a list of \code{\link[vegan]{anova.cca}} object is given for the argument \code{ordisigniaxis}, otherwise it is not considered. Default is 0.05. } \item{scaling}{ - Type of scaling used to project the results. A distance scaling (scaling 1) or a correlation scaling (scaling 2) can be used. Default is scaling 1. See details for more information. + Type of scaling used to project the consensus RDA result. A distance scaling (scaling = 1) or a correlation scaling (scaling = 2) can be used. Default is scaling = 1. See details for more information. } } \details{ -For the argument \code{ordisigniaxis}, if a vector of number of significant axes is given for each RDA, it is assumed that the significant axes are selected in sequential order from the first axis. -Although it is possible for the scaling to be 3 (it is available in the vegan package), this scaling should only be used for canonical correspondence analysis (CCA), it does not make any sense to use in the RDA framework. +For the argument \code{ordisigniaxis}, if a vector defining the number of significant axes is given, it is assumed that the significant axes are selected in sequential order from the first axis. +Although it is possible for the scaling to be 3 (it is available in the vegan package), this scaling should only be used for canonical correspondence analysis (CCA); it does not make any sense to use in the RDA framework. } \value{ \item{value}{A vector of eigenvalues associated to the axes of the consensus RDA} \item{siteConsensus}{A matrix of consensus sites scores} \item{spConsensus}{A matrix of consensus species scores} - \item{descConsensus}{A matrix of consensus canonical coefficient} + \item{descConsensus}{A matrix of consensus canonical coefficients} } \author{ F. Guillaume Blanchet Modified: pkg/ordiconsensus/man/ordiconsensus-package.Rd =================================================================== --- pkg/ordiconsensus/man/ordiconsensus-package.Rd 2014-06-06 10:21:42 UTC (rev 2872) +++ pkg/ordiconsensus/man/ordiconsensus-package.Rd 2014-06-06 13:00:16 UTC (rev 2873) @@ -6,15 +6,15 @@ Consensus RDA package } \description{ -Package to perform a consensus RDA, a method that finds the consensus among different RDA (or distance-based RDA) performed using different dissimilarity coefficients (e.g. Hellinger, Chord, Bray-Curtis) +Package to perform a consensus RDA, a method that finds the consensus among different RDA (or distance-based RDA) performed using different association coefficients (e.g. Hellinger, Chord, Bray-Curtis). } \details{ \tabular{ll}{ Package: \tab ordiconsensus\cr Type: \tab Package\cr -Version: \tab 0.4\cr +Version: \tab 1.0\cr Date: \tab 2012-11-12\cr -License: \tab Unlimited\cr +License: \tab GPL (>=2)\cr } This package includes different functions to perform a consensus RDA. It follows the work of Blanchet et al. (In press) } Modified: pkg/ordiconsensus/man/simulSADcomm.Rd =================================================================== --- pkg/ordiconsensus/man/simulSADcomm.Rd 2014-06-06 10:21:42 UTC (rev 2872) +++ pkg/ordiconsensus/man/simulSADcomm.Rd 2014-06-06 13:00:16 UTC (rev 2873) @@ -18,13 +18,13 @@ A matrix of explanatory variables to use to construct the species. } \item{expl.rand.sel}{ -Logical. Whether explanatory should be randomly selected to construct species (TRUE) or a fixed combination should be given (FALSE). (Default is TRUE) +Logical. Whether an explanatory variable should be randomly selected to construct a species (TRUE) or a fixed combination should be given (FALSE). (Default is TRUE) } \item{nexpl.comb}{ -Numeric. The number of explanatory variables that will be combined together to construct the environmental variables. Default is 2. +Numeric. The number of explanatory variables that will be combined together to construct a species. Default is 2. } \item{binary}{ -Logical. Whether the site-by-species matrix is an abundance (FALSE) or a presence/absence (TRUE). Default is FALSE. +Logical. Whether the site-by-species matrix presents abundances (FALSE) or presence/absence (TRUE). Default is FALSE. } \item{fix.expl}{ A matrix that defines which combination of explanatory variables should be used to construct species. This argument is only active when expl.rand.sel=FALSE. See Details for more information. @@ -33,30 +33,30 @@ Numeric. Number of sites (rows) in the resulting community matrix. See Details. } \item{weight}{ -A vector of regression coefficient used to give weight on each species. If NULL, weights are random selected through a random samping of a uniform distribution with a range defined by range.weight. Default is NULL. +A vector of regression coefficient used to give weight to each species. If NULL, weights are selected by randomly samping of a uniform distribution with a range defined by range.weight. Default is NULL. } \item{range.weight}{ -A vector of length 2 giving the minimum and the maximum of a uniform distribution from which \code{weights} will be sampled. This will be used to weight each species use to construct an explanatory variable. Default is 0 and 2. +A vector of length 2 giving the minimum and maximum of a uniform distribution from which the \code{weight} will be sampled. Default is 0 and 2. } \item{sd.expl}{ -Logical. This argument is only active when \code{expl.rand.sel} is FALSE (That is when a fixed combination of explanatory variable is used to construct a community matrix). Whether the standard deviation of the Normal error added when constructing a species is a multiplier of the standard deviation of the deterministic portion of the newly created explanatory variable (TRUE) or the pure standard deviation (FALSE). Default is FALSE. +Logical. This argument is only active when \code{expl.rand.sel} is FALSE (That is when a fixed combination of explanatory variable is used to construct a community matrix). This could be either the standard deviation of the Normal error added when constructing a species is a multiplier of the standard deviation of the deterministic portion of the newly created explanatory variable (TRUE) or the pure standard deviation (FALSE). Default is FALSE. } \item{norm}{ Vector of length 2 giving the mean and a multiplier of the standard deviation of the deterministic portion of a newly created explanatory variable. Default is mean = 0 and multiplier of the standard deviation of the new deterministic explanatory variable = 1. } } \details{ -The argument \code{sp.abund} defines the species-abundance distribution structure of the data following the binnings proposed by Gray et al. (2006). For example, if the vector is (40,20,30), it means that there will be 40 species with 1 individual, 20 with 2 or 3 individuals, and 30 with 4 to 7 individuals. +The argument \code{sp.abund} defines the species-abundance distribution structure of the data following the binning proposed by Gray et al. (2006). For example, if the vector is (40,20,30), it means that there will be 40 species with 1 individual, 20 with 2 or 3 individuals, and 30 with 4 to 7 individuals. -The individuals are assigned to the sites according to the the set of exlanatory variables given in \code{expl.var}. It is possible that a site occur with 0 individuals. They will be included in the community matrix and should be dealt with \emph{a posteriori}. +The individuals are assigned to the sites according to the set of exlanatory variables given in \code{expl.var}. It is possible that a site occur with 0 individuals. They will be included in the community matrix and should be dealt with \emph{a posteriori}. -When \code{expl.rand.sel} is TRUE, the explanatory variables are randomly sampled (without replacement) when combining (adding) explanatory variables together. The number of explanatory variables must be a multiple of nexpl.comb. +If \code{expl.rand.sel} is TRUE, the explanatory variables are randomly sampled (without replacement) when combining (adding) explanatory variables together. The number of explanatory variables must be a multiple of nexpl.comb. -Error is included to a species by multiplying a weight to the explanatory variable used to construct the species and by adding a normally distributed error term to the same explanatory variable. An error term with a standard deviation equal to the standard deviation of the explanatory variable allows for the explanatory variable to explain roughly 50% of the species it constructed. +Error is included to a species by multiplying a weight to the explanatory variable used to construct the species and by adding a normally distributed error term to the same explanatory variable. An error term with a standard deviation equal to the standard deviation of the explanatory variable allows for the explanatory variable to explain roughly 50% of the constructed species. -\code{fix.expl} is a matrix that has as many rows as there are species and as many columns as \code{nexpl.comb} (number of explanatory variables to combine). The numbers in \code{fix.expl} are integers that refers to the columns of \code{expl.var}. When \code{fix.expl} is used, \code{nexpl.comb} becomes meaningless. +\code{fix.expl} is a matrix that has as many rows as there are species and as many columns as \code{nexpl.comb} (number of explanatory variables to combine). The numbers in \code{fix.expl} are integers that refers to the columns of \code{expl.var}. When \code{fix.expl} is TRUE, \code{nexpl.comb} becomes meaningless. -If a presence-absence matrix is constructed (\code{binary}=TRUE), \code{sp.abund} should be constructed in such a way that no bin should include species with an abundance larger than the number of sites. If it is not the case, an error message will be sent. Within, this constraint, if the maximum of the last bin (the one with the largest abundance) is larger than the number of site, it will be automatically changed to the number of sites-1. +If a presence-absence matrix is constructed (\code{binary}=TRUE), \code{sp.abund} should be constructed in such a way that no bin should include species with an abundance larger than the number of sites, otherwise an error message will be sent. Within, this constraint, if the maximum of the last bin (the one with the largest abundance) is larger than the number of site, it will be automatically changed to the number of sites-1. This function was designed to do much more than the simulations generated in the work of Blanchet et al. (in press). It is meant to be used for future simulation studies. }