[Vegan-commits] r2235 - pkg/vegan/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jul 13 20:52:27 CEST 2012


Author: psolymos
Date: 2012-07-13 20:52:27 +0200 (Fri, 13 Jul 2012)
New Revision: 2235

Modified:
   pkg/vegan/man/adipart.Rd
   pkg/vegan/man/multipart.Rd
Log:
getting rid of factors in adipart et al. examples

Modified: pkg/vegan/man/adipart.Rd
===================================================================
--- pkg/vegan/man/adipart.Rd	2012-07-13 18:43:22 UTC (rev 2234)
+++ pkg/vegan/man/adipart.Rd	2012-07-13 18:52:27 UTC (rev 2235)
@@ -36,10 +36,9 @@
     all rows are in the same group in the second level.}
   \item{formula}{A two sided model formula in the form \code{y ~ x}, where \code{y} 
     is the community data matrix with samples as rows and species as column. Right 
-    hand side (\code{x}) must contain factors referring to levels of sampling hierarchy, 
+    hand side (\code{x}) must grouping vaiables referring to levels of sampling hierarchy, 
     terms from right to left will be treated as nested (first column is the lowest, 
-    last is the highest level). These variables must be factors in order to unambiguous 
-    handling. Interaction terms are not allowed.}
+    last is the highest level, at least two levels specified). Interaction terms are not allowed.}
   \item{data}{A data frame where to look for variables defined in the right hand side 
     of \code{formula}. If missing, variables are looked in the global environment.}
   \item{index}{Character, the diversity index to be calculated (see Details).}
@@ -127,10 +126,10 @@
     out <- rep(1, length(x))
     for (i in 2:(length(cut) - 1))
         out[which(x > cut[i] & x <= cut[(i + 1)])] <- i
-    return(as.factor(out))}
+    return(out)}
 ## The hierarchy of sample aggregation
 levsm <- data.frame(
-    l1=as.factor(1:nrow(mite)),
+    l1=1:nrow(mite),
     l2=cutter(mite.xy$y, cut = seq(0, 10, by = 2.5)),
     l3=cutter(mite.xy$y, cut = seq(0, 10, by = 5)),
     l4=cutter(mite.xy$y, cut = seq(0, 10, by = 10)))

Modified: pkg/vegan/man/multipart.Rd
===================================================================
--- pkg/vegan/man/multipart.Rd	2012-07-13 18:43:22 UTC (rev 2234)
+++ pkg/vegan/man/multipart.Rd	2012-07-13 18:52:27 UTC (rev 2235)
@@ -25,10 +25,9 @@
     all rows are in the same group in the second level.}
   \item{formula}{A two sided model formula in the form \code{y ~ x}, where \code{y} 
     is the community data matrix with samples as rows and species as column. Right 
-    hand side (\code{x}) must contain factors referring to levels of sampling hierarchy, 
+    hand side (\code{x}) must grouping vaiables referring to levels of sampling hierarchy, 
     terms from right to left will be treated as nested (first column is the lowest, 
-    last is the highest level). These variables must be factors in order to unambiguous 
-    handling. Interaction terms are not allowed.}
+    last is the highest level, at least two levels specified). Interaction terms are not allowed.}
   \item{data}{A data frame where to look for variables defined in the right hand side 
     of \code{formula}. If missing, variables are looked in the global environment.}
   \item{index}{Character, the entropy index to be calculated (see Details).}
@@ -104,10 +103,10 @@
     out <- rep(1, length(x))
     for (i in 2:(length(cut) - 1))
         out[which(x > cut[i] & x <= cut[(i + 1)])] <- i
-    return(as.factor(out))}
+    return(out)}
 ## The hierarchy of sample aggregation
 levsm <- data.frame(
-    l1=as.factor(1:nrow(mite)),
+    l1=1:nrow(mite),
     l2=cutter(mite.xy$y, cut = seq(0, 10, by = 2.5)),
     l3=cutter(mite.xy$y, cut = seq(0, 10, by = 5)),
     l4=cutter(mite.xy$y, cut = seq(0, 10, by = 10)))



More information about the Vegan-commits mailing list