[Vegan-commits] r1498 - in branches/1.17: . R inst inst/doc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Feb 20 11:51:10 CET 2011


Author: jarioksa
Date: 2011-02-20 11:51:10 +0100 (Sun, 20 Feb 2011)
New Revision: 1498

Modified:
   branches/1.17/DESCRIPTION
   branches/1.17/R/allPerms.R
   branches/1.17/R/as.ts.permat.R
   branches/1.17/R/beals.R
   branches/1.17/R/betadisper.R
   branches/1.17/R/bstick.default.R
   branches/1.17/R/cIndexKM.R
   branches/1.17/R/contribdiv.R
   branches/1.17/R/dispindmorisita.R
   branches/1.17/R/diversity.R
   branches/1.17/R/estimateR.default.R
   branches/1.17/R/nestednodf.R
   branches/1.17/R/ordisurf.R
   branches/1.17/R/pasteCall.R
   branches/1.17/R/permatfull.R
   branches/1.17/R/permatswap.R
   branches/1.17/R/permuplot.R
   branches/1.17/R/permute.R
   branches/1.17/R/pregraphKM.R
   branches/1.17/R/print.allPerms.R
   branches/1.17/R/procrustes.R
   branches/1.17/R/scores.betadisper.R
   branches/1.17/R/summary.permat.R
   branches/1.17/R/vegdist.R
   branches/1.17/inst/ChangeLog
   branches/1.17/inst/doc/FAQ-vegan.texi
Log:
merged r1494-1497: no return, procrustes input check & FAQ updates

Modified: branches/1.17/DESCRIPTION
===================================================================
--- branches/1.17/DESCRIPTION	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/DESCRIPTION	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 1.17-7
-Date: February 16, 2011
+Version: 1.17-8
+Date: February 20, 2011
 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, 
    R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, 
    Helene Wagner  

Modified: branches/1.17/R/allPerms.R
===================================================================
--- branches/1.17/R/allPerms.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/allPerms.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -217,5 +217,5 @@
     class(res) <- "allPerms"
     attr(res, "control") <- control
     attr(res, "observed") <- observed
-    return(res)
+    res
 }

Modified: branches/1.17/R/as.ts.permat.R
===================================================================
--- branches/1.17/R/as.ts.permat.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/as.ts.permat.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -7,5 +7,6 @@
         seqmethods <- c("swap", "tswap", "abuswap")
         stop("as.ts available only for sequential methods ",
             paste(seqmethods, collapse=", "))
-    } else return(out)
+    } 
+    out
 }

Modified: branches/1.17/R/beals.R
===================================================================
--- branches/1.17/R/beals.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/beals.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -16,52 +16,49 @@
 ##        all species.                                       #
 ##  'include' flag to include target species in the computation#
 ##############################################################
-beals<-function(x, species=NA, reference=x, type=0, include=TRUE)
+`beals` <-
+    function(x, species=NA, reference=x, type=0, include=TRUE)
 {
     refX <- reference
-    # this checks whether it was chosen from available options
+    ## this checks whether it was chosen from available options
     mode <- as.numeric(match.arg(as.character(type), c("0","1","2","3")))
     spIndex <- species
     incSp <- include
-#    if(is.null(refX))              # I think this is unnecessary because of the default above
-#            refX<-x                # and it should look like missing(refX) and not is.null(refX)
-   refX <- as.matrix(refX)
-   x <- as.matrix(x)
-   if(mode==0 || mode ==2) refX <- ifelse(refX > 0, 1, 0)
-   if(mode==0 || mode ==1) x <- ifelse(x > 0, 1, 0)
-   #Computes conditioned probabilities
-   if(is.na(spIndex)){
-       M <- crossprod(ifelse(refX > 0, 1, 0),refX)
-      C <-diag(M)
-     M <- sweep(M, 2, replace(C,C==0,1), "/")
-     if(!incSp)
-         for (i in 1:ncol(refX))
-            M[i,i]<-0
+    refX <- as.matrix(refX)
+    x <- as.matrix(x)
+    if(mode==0 || mode ==2) refX <- ifelse(refX > 0, 1, 0)
+    if(mode==0 || mode ==1) x <- ifelse(x > 0, 1, 0)
+    ##Computes conditioned probabilities
+    if(is.na(spIndex)){
+        M <- crossprod(ifelse(refX > 0, 1, 0),refX)
+        C <-diag(M)
+        M <- sweep(M, 2, replace(C,C==0,1), "/")
+        if(!incSp)
+            for (i in 1:ncol(refX))
+                M[i,i] <- 0
     } else {
-       C<-colSums(refX)
-       M<-crossprod(refX,ifelse(refX > 0, 1, 0)[,spIndex])
-       M<-M/replace(C,C==0,1)
-       if(!incSp)
-          M[spIndex]<-0
+        C <- colSums(refX)
+        M <- crossprod(refX,ifelse(refX > 0, 1, 0)[,spIndex])
+        M <- M/replace(C,C==0,1)
+        if(!incSp)
+            M[spIndex] <- 0
     }
-   #Average of conditioned probabilities
-   S <- rowSums(x)
-   if(is.na(spIndex)) {
-       b <-x
-       for (i in 1:nrow(x)) {
-       b[i, ] <- rowSums(sweep(M, 2, x[i, ], "*"))
-       }
-       SM<-rep(S,ncol(x))
-       if(!incSp)
-           SM<-SM-x
-       b <- b/replace(SM,SM==0,1)
-   } else {
-       b<-rowSums(sweep(x,2,M,"*"))
-       if(!incSp)
-           S<-S-x[,spIndex]
-       b <- b/replace(S,S==0,1)
-   }
-#   attr(b, "smoothtype") <- mode
-#   class(b) <- c("beals", class(b))        # this can later be used to write the methods, i.e. beals test, etc.
-   return(b)
+    ##Average of conditioned probabilities
+    S <- rowSums(x)
+    if(is.na(spIndex)) {
+        b <-x
+        for (i in 1:nrow(x)) {
+            b[i, ] <- rowSums(sweep(M, 2, x[i, ], "*"))
+        }
+        SM <- rep(S,ncol(x))
+        if(!incSp)
+            SM <- SM-x
+        b <- b/replace(SM,SM==0,1)
+    } else {
+        b <-rowSums(sweep(x,2,M,"*"))
+        if(!incSp)
+            S <- S-x[,spIndex]
+        b <- b/replace(S,S==0,1)
+    }
+    b
 }

Modified: branches/1.17/R/betadisper.R
===================================================================
--- branches/1.17/R/betadisper.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/betadisper.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -6,7 +6,7 @@
         axes <- seq_len(NCOL(vectors))
         spMedPos <- ordimedian(vectors, group, choices = axes[pos])
         spMedNeg <- ordimedian(vectors, group, choices = axes[!pos])
-        return(cbind(spMedPos, spMedNeg))
+        cbind(spMedPos, spMedNeg)
     }
     ## Tolerance for zero Eigenvalues
     TOL <- 1e-7

Modified: branches/1.17/R/bstick.default.R
===================================================================
--- branches/1.17/R/bstick.default.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/bstick.default.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -3,5 +3,5 @@
 {
     res <- rev(cumsum(tot.var/n:1)/n)
     names(res) <- paste("Stick", seq(len=n), sep="")
-    return(res)
+    res
 }

Modified: branches/1.17/R/cIndexKM.R
===================================================================
--- branches/1.17/R/cIndexKM.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/cIndexKM.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -26,7 +26,7 @@
                 varwithins[k, l] <- sum(x[cluster == k, l])
             }
         }
-        return(varwithins)
+        varwithins
     }
 ##########################################
     maxmindist <- function(clsize, distscen) 
@@ -68,8 +68,7 @@
             }
             i <- i - 1
         }
-        minmaxd <- list(mindw = mindw, maxdw = maxdw)
-        return(minmaxd)
+        list(mindw = mindw, maxdw = maxdw)
     }
 #############################################
     gss <- function(x, clsize, withins) 
@@ -81,8 +80,7 @@
         allmeandist <- sum(dmean^2)
         wgss <- sum(withins)
         bgss <- allmeandist - wgss
-        zgss <- list(wgss = wgss, bgss = bgss)
-        return(zgss)
+        list(wgss = wgss, bgss = bgss)
     }
 #############################################
     vargss <- function(x, clsize, varwithins) 
@@ -102,8 +100,7 @@
         }
         varbgss <- varallmeandist - varwgss
         vartss <- varbgss + varwgss
-        zvargss <- list(vartss = vartss, varbgss = varbgss)
-        return(zvargss)
+        list(vartss = vartss, varbgss = varbgss)
     }
 		
 #################################################
@@ -116,7 +113,7 @@
                      d = d, PACKAGE = "cclust")
         d <- retval$d
         names(d) <- 0:nc
-        return(d)
+        d
     }
 ################################################
 ### Function modified by SD and PL from the original "cIndexKM" in "cclust" 
@@ -129,8 +126,7 @@
     {
         n <- sum(clsize)
         k <- length(clsize)
-        vrc <- (zgss$bgss/(k - 1))/(zgss$wgss/(n - k))
-        return(vrc = vrc)
+        zgss$bgss/(k - 1)/(zgss$wgss/(n - k))
     }
 ################################################
     ssi <- function(centers, clsize) 
@@ -153,7 +149,7 @@
             exp(-min(absmdif))
         sist <- sum(span)/hiest
         sistw <- (span * exp(-absmdif)) %*% sqrt(csizemax * csizemin)/hiestw
-        return(list(ssi = sist, ssiw = sistw))
+        list(ssi = sist, ssiw = sistw)
     }
 ################################################
 		

Modified: branches/1.17/R/contribdiv.R
===================================================================
--- branches/1.17/R/contribdiv.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/contribdiv.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -2,8 +2,9 @@
 ## Lu, H.P., H.H. Wagner and X.Y. Chen (2007). 
 ## A contribution diversity approach to evaluate species diversity. 
 ## Basic and Applied Ecology 8: 1 -12.
-contribdiv <-
-function(comm, index = c("richness", "simpson"), relative = FALSE, scaled = TRUE, drop.zero = FALSE)
+`contribdiv` <-
+    function(comm, index = c("richness", "simpson"), relative = FALSE,
+             scaled = TRUE, drop.zero = FALSE)
 {
 
     index <- match.arg(index)
@@ -47,5 +48,5 @@
     attr(rval, "relative") <- relative
     attr(rval, "scaled") <- scaled
     class(rval) <- c("contribdiv", "data.frame")
-    return(rval)
+    rval
 }

Modified: branches/1.17/R/dispindmorisita.R
===================================================================
--- branches/1.17/R/dispindmorisita.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/dispindmorisita.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -26,6 +26,6 @@
     usp <- which(apply(x > 0, 2, sum) == 1)
     if (unique.rm && length(usp) != 0)
         out <- out[-usp,]
-    return(out)
+    out
 }
 

Modified: branches/1.17/R/diversity.R
===================================================================
--- branches/1.17/R/diversity.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/diversity.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,21 +1,19 @@
-"diversity" <-
+`diversity` <-
   function (x, index = "shannon", MARGIN = 1, base = exp(1)) 
 {
-  x <- as.matrix(x)
-  INDICES <- c("shannon", "simpson", "invsimpson")
-  index <- match.arg(index, INDICES)
-  total <- apply(x, MARGIN, sum)
-  x <- sweep(x, MARGIN, total, "/")
-  if (index == "shannon")
-    x <- -x * log(x, base)
-  else
-    x <- x^2
-  H <- apply(x, MARGIN, sum, na.rm = TRUE)
-  if (index == "simpson") 
-    H <- 1 - H
-  else if (index == "invsimpson") 
-    H <- 1/H
-  return(H)
+    x <- as.matrix(x)
+    INDICES <- c("shannon", "simpson", "invsimpson")
+    index <- match.arg(index, INDICES)
+    total <- apply(x, MARGIN, sum)
+    x <- sweep(x, MARGIN, total, "/")
+    if (index == "shannon")
+        x <- -x * log(x, base)
+    else
+        x <- x^2
+    H <- apply(x, MARGIN, sum, na.rm = TRUE)
+    if (index == "simpson") 
+        H <- 1 - H
+    else if (index == "invsimpson") 
+        H <- 1/H
+    H
 }
-
-

Modified: branches/1.17/R/estimateR.default.R
===================================================================
--- branches/1.17/R/estimateR.default.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/estimateR.default.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,4 +1,4 @@
-"estimateR.default" <-
+`estimateR.default` <-
     function (x, ...) 
 {
     gradF <- function(a, i) {
@@ -24,7 +24,7 @@
         Grad[1] <- .expr25/.expr26 * .expr20 + .expr8 * (1 + 
                                                          (.expr18 + a[1] * (.expr12/.expr16 - .expr13 * ((.expr7 - 
                                                                                                           .expr25 * .expr4) * .expr15 + .expr14)/.expr35)))
-        return(Grad)
+        Grad
     }
     if (!identical(all.equal(x, round(x)), TRUE)) 
         stop("function accepts only integers (counts)")

Modified: branches/1.17/R/nestednodf.R
===================================================================
--- branches/1.17/R/nestednodf.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/nestednodf.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -68,5 +68,5 @@
     out <- list(comm = comm, fill = fill,
                 statistic = c(N.columns = N.columns, N.rows = N.rows, NODF = NODF))
     class(out) <- "nestednodf"
-    return(out)
+    out
 }

Modified: branches/1.17/R/ordisurf.R
===================================================================
--- branches/1.17/R/ordisurf.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/ordisurf.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,4 +1,4 @@
-"ordisurf" <-
+`ordisurf` <-
     function (x, y, choices = c(1, 2), knots = 10, family = "gaussian", 
               col = "red", thinplate = TRUE, add = FALSE, display = "sites", 
               w = weights(x), main, nlevels = 10, levels, labcex = 0.6,
@@ -72,5 +72,5 @@
             drawlabels = !is.null(labcex) && labcex > 0)
     mod$grid <- list(x = xn1, y = xn2, z = matrix(fit, nrow = GRID))
     class(mod) <- c("ordisurf", class(mod))
-    return(mod)
+    mod
 }

Modified: branches/1.17/R/pasteCall.R
===================================================================
--- branches/1.17/R/pasteCall.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/pasteCall.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,6 +1,5 @@
 `pasteCall` <- function (call, prefix = "Call:") 
 {
     call.str <- paste(deparse(call), collapse = " ")
-    call.str <- paste(prefix, call.str, "\n", sep = " ")
-    return(call.str)
+    paste(prefix, call.str, "\n", sep = " ")
 }

Modified: branches/1.17/R/permatfull.R
===================================================================
--- branches/1.17/R/permatfull.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/permatfull.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -12,12 +12,12 @@
    y <- table(sample(1:N, n, replace = TRUE))
    out[names(out) %in% names(y)] <- y
    names(out) <- NULL
-   return(out)
+   out
 }
 bothshuffle <- function(x, y=1)
 {
     x[x!=0] <- indshuffle(x[x!=0] - y) + y
-    return(sample(x))
+    sample(x)
 }
     if (!identical(all.equal(m, round(m)), TRUE))
        stop("function accepts only integers (counts)")
@@ -80,5 +80,5 @@
     attr(out, "burnin") <- NA
     attr(out, "thin") <- NA
     class(out) <- c("permatfull", "permat")
-    return(out)
+    out
 }

Modified: branches/1.17/R/permatswap.R
===================================================================
--- branches/1.17/R/permatswap.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/permatswap.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -13,12 +13,12 @@
    y <- table(sample(1:N, n, replace = TRUE))
    out[names(out) %in% names(y)] <- y
    names(out) <- NULL
-   return(out)
+   out
 }
 bothshuffle <- function(x, y=1)
 {
     x[x!=0] <- indshuffle(x[x!=0] - y) + y
-    return(sample(x))
+    sample(x)
 }
     if (!identical(all.equal(m, round(m)), TRUE))
        stop("function accepts only integers (counts)")
@@ -167,5 +167,5 @@
     attr(out, "burnin") <- burnin
     attr(out, "thin") <- thin
     class(out) <- c("permatswap", "permat")
-    return(out)
+    out
 }

Modified: branches/1.17/R/permuplot.R
===================================================================
--- branches/1.17/R/permuplot.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/permuplot.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -12,27 +12,23 @@
         angle <- seq(0, 2*pi, length = n+1)[-(n+1)]
         x <- rev(cos(angle))
         y <- rev(sin(angle))
-        xy <- xy.coords(x, y)
-        return(xy)
+        xy.coords(x, y)
     }
     xy.free <- function(n) {
         x <- runif(n)
         y <- runif(n)
-        xy <- xy.coords(x, y)
-        return(xy)
+        xy.coords(x, y)
     }
     xy.grid <- function(ncol, nrow) {
         x <- rep(seq_len(ncol), each = nrow)
         y <- rev(rep(seq_len(nrow), times = ncol))
-        xy <- xy.coords(x, y)
-        return(xy)
+        xy.coords(x, y)
     }
     axis.limits <- function(vals, inset) {
         lim <- range(vals[is.finite(vals)])
         lim.range <- lim[2] - lim[1]
-        res <- c(lim[1] - (lim.range * inset),
-                 lim[2] + (lim.range * inset))
-        return(res)
+        c(lim[1] - (lim.range * inset),
+          lim[2] + (lim.range * inset))
     }
     ## currently doesn't support restricted permutations of strata themselves
     if(control$permute.strata && control$type != "free")

Modified: branches/1.17/R/permute.R
===================================================================
--- branches/1.17/R/permute.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/permute.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,4 +1,6 @@
-permute <- function(i, n, control) {
+`permute` <-
+    function(i, n, control)
+{
     if(control$complete && !is.null(control$all.perms))
         perm <- control$all.perms[i,]
     else {
@@ -6,5 +8,5 @@
             warning("'$all.perms' is NULL, yet '$complete = TRUE'.\nReturning a random permutation.")
         perm <- permuted.index2(n, control)
     }
-    return(perm)
+    perm
 }

Modified: branches/1.17/R/pregraphKM.R
===================================================================
--- branches/1.17/R/pregraphKM.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/pregraphKM.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,6 +1,7 @@
-"pregraphKM" <- function(matrice)
+`pregraphKM` <-
+    function(matrice)
 {
-    "row.col.number" <-function(mat,number){
+    `row.col.number` <- function(mat,number){
         nr<-nrow(mat)
         nc<-ncol(mat)
         mod<-number %% nr
@@ -20,7 +21,7 @@
                 }
             }
         }
-        return(list(nr=nr.f,nc=nc.f))
+        list(nr=nr.f,nc=nc.f)
     }
 
     ## Beginning of the function

Modified: branches/1.17/R/print.allPerms.R
===================================================================
--- branches/1.17/R/print.allPerms.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/print.allPerms.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,9 +1,11 @@
-`print.allPerms` <- function(x, ...) {
+`print.allPerms` <-
+    function(x, ...)
+{
     dims <- dim(x)
     control <- attr(x, "control")
     observed <- attr(x, "observed")
     attributes(x) <- NULL
     dim(x) <- dims
     print(x)
-    return(invisible(x))
+    invisible(x)
 }

Modified: branches/1.17/R/procrustes.R
===================================================================
--- branches/1.17/R/procrustes.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/procrustes.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,8 +1,11 @@
-"procrustes" <-
+`procrustes` <-
     function (X, Y, scale = TRUE, symmetric = FALSE,  scores = "sites", ...) 
 {
     X <- scores(X, display = scores, ...)
     Y <- scores(Y, display = scores, ...)
+    if (nrow(X) != nrow(Y))
+        stop("Matrices have different number of rows: ",
+             nrow(X), " and ", nrow(Y))
     if (ncol(X) < ncol(Y)) {
         warning("X has fewer axes than Y: X adjusted to comform Y\n")
         addcols <- ncol(Y) - ncol(X)
@@ -38,5 +41,5 @@
                   symmetric = symmetric, call = match.call())
     reslt$svd <- sol
     class(reslt) <- "procrustes"
-    return(reslt)
+    reslt
 }

Modified: branches/1.17/R/scores.betadisper.R
===================================================================
--- branches/1.17/R/scores.betadisper.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/scores.betadisper.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,5 +1,6 @@
-`scores.betadisper` <- function(x, display = c("sites", "centroids"),
-                                choices = c(1,2), ...)
+`scores.betadisper` <-
+    function(x, display = c("sites", "centroids"),
+             choices = c(1,2), ...)
 {
     display <- match.arg(display, several.ok = TRUE)
     sol <- list()
@@ -13,5 +14,5 @@
     }
     if (length(sol) == 1)
         sol <- sol[[1]]
-    return(sol)
+    sol
 }

Modified: branches/1.17/R/summary.permat.R
===================================================================
--- branches/1.17/R/summary.permat.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/summary.permat.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,6 +1,6 @@
 ## S3 summary method for permat
 `summary.permat` <-
-function(object, ...)
+    function(object, ...)
 {
     x <- object
     n <- attr(x, "times")
@@ -43,5 +43,5 @@
     out <- list(x=x, bray=bray, chisq=chisq, sum=psum, fill=pfill, rowsums=vrow, colsums=vcol,
         browsums=brow, bcolsums=bcol, strsum=ssum)
     class(out) <- c("summary.permat", "list")
-    return(out)
+    out
 }

Modified: branches/1.17/R/vegdist.R
===================================================================
--- branches/1.17/R/vegdist.R	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/R/vegdist.R	2011-02-20 10:51:10 UTC (rev 1498)
@@ -1,4 +1,4 @@
-"vegdist" <-
+`vegdist` <-
     function (x, method = "bray", binary = FALSE, diag = FALSE, upper = FALSE, 
               na.rm = FALSE, ...) 
 {
@@ -44,5 +44,5 @@
                                "binary ", METHODS[method], sep = "")
     attr(d, "call") <- match.call()
     class(d) <- "dist"
-    return(d)
+    d
 }

Modified: branches/1.17/inst/ChangeLog
===================================================================
--- branches/1.17/inst/ChangeLog	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/inst/ChangeLog	2011-02-20 10:51:10 UTC (rev 1498)
@@ -2,6 +2,14 @@
 
 VEGAN RELEASE VERSIONS at http://cran.r-project.org/
 
+Version 1.17-8 (opened February 20, 2011)
+
+	* merged r1494: no return.
+
+	* merged r1495: procrustes checks input.
+
+	* merged r1496,7: FAQ updates.
+
 Version 1.17-7 (released February 16, 2011)
 
 	* merged r1489: nestednodf with weighted = FALSE.

Modified: branches/1.17/inst/doc/FAQ-vegan.texi
===================================================================
--- branches/1.17/inst/doc/FAQ-vegan.texi	2011-02-17 09:25:56 UTC (rev 1497)
+++ branches/1.17/inst/doc/FAQ-vegan.texi	2011-02-20 10:51:10 UTC (rev 1498)
@@ -3,7 +3,7 @@
 @setfilename FAQ-vegan.info
 @settitle vegan FAQ
 @setchapternewpage on
- at set FAQ_YEAR 2010
+ at set FAQ_YEAR 2011
 @afourpaper
 @c %**end of header
 
@@ -21,7 +21,7 @@
 Creative Commons, 543 Howard Street, 5th Floor, San Francisco,
 California, 94105, USA.
 
-Copyright @copyright{} 2010 Jari Oksanen
+Copyright @copyright{} 2008-2011 Jari Oksanen
 @end quotation
 @end copying
 
@@ -312,6 +312,8 @@
 * Constrained permutations in vegan::  
 * How to use different plotting symbols in ordination graphics?::  
 * How to avoid cluttered ordination graphs?::  
+* Can I flip an axis in ordination diagram?::  
+* Can I zoom into an ordination plot?::  
 @end menu
 
 @node  I have only numeric and positive data but vegan still complaints, Can you analyse binary or cover class data?, Ordination, Ordination
@@ -524,7 +526,7 @@
 commands are fully configurable, and allow different plotting symbols
 and characters.
 
- at node How to avoid cluttered ordination graphs?,  , How to use different plotting symbols in ordination graphics?, Ordination
+ at node How to avoid cluttered ordination graphs?, Can I flip an axis in ordination diagram?, How to use different plotting symbols in ordination graphics?, Ordination
 @section How to avoid cluttered ordination graphs?
 
 If there is a really high number of species or sites, the graphs often
@@ -562,6 +564,11 @@
 points, and tries to optimize the location of the text to minimize the
 overlap. 
 
+ at item
+Ordination @code{text} and @code{points} functions have argument
+ at code{select} that can be used for full control of selecting items
+plotted as text or points.
+
 @item 
 Use interactive @code{orditkplot} function that lets you drag
 labels of points to better positions if you need to see all labels. Only
@@ -574,16 +581,38 @@
 
 @end itemize
 
+ at node  Can I flip an axis in ordination diagram?, Can I zoom into an ordination plot?, How to avoid cluttered ordination graphs?, Ordination
+ at comment  node-name,  next,  previous,  up 
+ at section Can I flip an axis in ordination diagram?
 
+Use @code{xlim} or @code{ylim} flipped limits. If you have model
+ at code{mod <- cca(dune)} you can flip the first axis with 
+ at code{plot(mod, xlim = c(3, -2))}.
+
+ at node  Can I zoom into an ordination plot?,  , Can I flip an axis in ordination diagram?, Ordination
+ at comment  node-name,  next,  previous,  up
+ at section Can I zoom into an ordination plot?
+You can use @code{xlim} and @code{ylim} arguments in @code{plot} or
+ at code{ordiplot} to zoom into ordination diagrams. Normally you must set
+both @code{xlim} and @code{ylim} because ordination plots will keep the
+equal aspect ratio of axes, and they will fill the graph so that the
+longer axis will fit. 
+
+Dynamic zooming can be done with function @code{orditkplot}. You can
+directly save the edited @code{orditkplot} graph in various graphic
+formats, or you can export the graph object back to R and use
+ at code{plot} to display the results. 
+
 @node Other analysis methods ,  , Ordination, Top
 @chapter Other analysis methods
 
 @menu
 * Is there TWINSPAN?::          
+* Why strata do not influence adonis results?::  
 * How is deviance calculated?::  
 @end menu
 
- at node Is there TWINSPAN?, How is deviance calculated?, Other analysis methods , Other analysis methods
+ at node Is there TWINSPAN?, Why strata do not influence adonis results?, Other analysis methods , Other analysis methods
 @section Is there TWINSPAN?
 
 No.  It may be possible to port @acronym{TWINSPAN} to vegan, but it is
@@ -591,7 +620,16 @@
 will be happy to help.  @acronym{TWINSPAN} has a very permissive
 license, and it would be completely legal to port the function into R.
 
- at node How is deviance calculated?,  , Is there TWINSPAN?, Other analysis methods
+ at node  Why strata do not influence adonis results?, How is deviance calculated?, Is there TWINSPAN?, Other analysis methods
+ at comment  node-name,  next,  previous,  up
+ at section Why strata do not influence adonis results?
+Permutation happens only within @code{strata} and this influences the
+permutation distribution of the statistics and probably the significance
+levels, but @code{strata} do not influence the calculation of the
+statistics.
+
+
+ at node How is deviance calculated?,  , Why strata do not influence adonis results?, Other analysis methods
 @section How is deviance calculated?
 
 Some vegan functions, such as @code{radfit} use base R facility of



More information about the Vegan-commits mailing list