[Vegan-commits] r2873 - in pkg/ordiconsensus: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 6 15:00:17 CEST 2014


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 <guillaume.blanchet at helsinki.fi>
 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.
 }



More information about the Vegan-commits mailing list