[Vegan-commits] r2909 - in pkg/vegan: . tests tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Nov 7 15:12:28 CET 2014


Author: jarioksa
Date: 2014-11-07 15:12:27 +0100 (Fri, 07 Nov 2014)
New Revision: 2909

Removed:
   pkg/vegan/tests/Examples/vegan-Ex.Rout.save
   pkg/vegan/tests/oecosimu-tests.R
   pkg/vegan/tests/oecosimu-tests.Rout.save
   pkg/vegan/tests/vegan-tests.R
   pkg/vegan/tests/vegan-tests.Rout.save
Modified:
   pkg/vegan/DESCRIPTION
Log:
Squashed commit of the following:

commit a3213955f51ffdd3feed87e7d38c101a807bbd12
Author: Jari Oksanen <jari.oksanen at oulu.fi>
Date:   Fri Nov 7 15:50:07 2014 +0200

    remove tests from the release version

commit e076ea25e2e8720136ac930e63ab075107d2b8f7
Author: Jari Oksanen <jari.oksanen at oulu.fi>
Date:   Fri Nov 7 15:48:33 2014 +0200

    Bump up version to 2.2-0 for CRAN release

commit f44316d16f19fa1d5fd307c61f96f0bc253f9bab
Author: Jari Oksanen <jari.oksanen at oulu.fi>
Date:   Fri Nov 7 15:45:46 2014 +0200

    Update web addresses to use github instead of R-Forge

Modified: pkg/vegan/DESCRIPTION
===================================================================
--- pkg/vegan/DESCRIPTION	2014-11-06 13:44:14 UTC (rev 2908)
+++ pkg/vegan/DESCRIPTION	2014-11-07 14:12:27 UTC (rev 2909)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 2.1-99
-Date: 2014-11-06
+Version: 2.2-0
+Date: 2014-11-07
 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, 
    Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, 
    M. Henry H. Stevens, Helene Wagner  
@@ -11,5 +11,6 @@
 Imports: MASS, cluster, mgcv
 Description: Ordination methods, diversity analysis and other
   functions for community and vegetation ecologists.
-License: GPL-2 
-URL: http://vegan.r-forge.r-project.org/
+License: GPL-2
+BugReports: https://github.com/vegandevs/vegan/issues
+URL: http://cran.r-project.org, https://github.com/vegandevs/vegan

Deleted: pkg/vegan/tests/Examples/vegan-Ex.Rout.save
===================================================================
--- pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2014-11-06 13:44:14 UTC (rev 2908)
+++ pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2014-11-07 14:12:27 UTC (rev 2909)
@@ -1,8417 +0,0 @@
-
-R Under development (unstable) (2014-11-03 r66928) -- "Unsuffered Consequences"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
-
-R is free software and comes with ABSOLUTELY NO WARRANTY.
-You are welcome to redistribute it under certain conditions.
-Type 'license()' or 'licence()' for distribution details.
-
-  Natural language support but running in an English locale
-
-R is a collaborative project with many contributors.
-Type 'contributors()' for more information and
-'citation()' on how to cite R or R packages in publications.
-
-Type 'demo()' for some demos, 'help()' for on-line help, or
-'help.start()' for an HTML browser interface to help.
-Type 'q()' to quit R.
-
-> pkgname <- "vegan"
-> source(file.path(R.home("share"), "R", "examples-header.R"))
-> options(warn = 1)
-> library('vegan')
-Loading required package: permute
-Loading required package: lattice
-This is vegan 2.1-43
-> 
-> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
-> cleanEx()
-> nameEx("BCI")
-> ### * BCI
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: BCI
-> ### Title: Barro Colorado Island Tree Counts
-> ### Aliases: BCI
-> ### Keywords: datasets
-> 
-> ### ** Examples
-> 
-> data(BCI)
-> ## UTM Coordinates (in metres)
-> UTM.EW <- rep(seq(625754, 626654, by=100), each=5)
-> UTM.NS <- rep(seq(1011569,  1011969, by=100), len=50)
-> 
-> 
-> 
-> cleanEx()
-> nameEx("CCorA")
-> ### * CCorA
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: CCorA
-> ### Title: Canonical Correlation Analysis
-> ### Aliases: CCorA biplot.CCorA
-> ### Keywords: multivariate
-> 
-> ### ** Examples
-> 
-> # Example using two mite groups. The mite data are available in vegan
-> data(mite)
-> # Two mite species associations (Legendre 2005, Fig. 4)
-> group.1 <- c(1,2,4:8,10:15,17,19:22,24,26:30)
-> group.2 <- c(3,9,16,18,23,25,31:35)
-> # Separate Hellinger transformations of the two groups of species 
-> mite.hel.1 <- decostand(mite[,group.1], "hel")
-> mite.hel.2 <- decostand(mite[,group.2], "hel")
-> rownames(mite.hel.1) = paste("S",1:nrow(mite),sep="")
-> rownames(mite.hel.2) = paste("S",1:nrow(mite),sep="")
-> out <- CCorA(mite.hel.1, mite.hel.2)
-> out
-
-Canonical Correlation Analysis
-
-Call:
-CCorA(Y = mite.hel.1, X = mite.hel.2) 
-
-              Y  X
-Matrix Ranks 24 11
-
-Pillai's trace:  4.573009 
-
-Significance of Pillai's trace:
-from F-distribution:   0.0032737 
-                       CanAxis1 CanAxis2 CanAxis3 CanAxis4 CanAxis5 CanAxis6
-Canonical Correlations  0.92810  0.82431  0.81209  0.74981  0.70795  0.65950
-                       CanAxis7 CanAxis8 CanAxis9 CanAxis10 CanAxis11
-Canonical Correlations  0.50189  0.48179  0.41089   0.37823      0.28
-
-                     Y | X  X | Y
-RDA R squares      0.33224 0.5376
-adj. RDA R squares 0.20560 0.2910
-
-> biplot(out, "ob")                 # Two plots of objects
-> biplot(out, "v", cex=c(0.7,0.6))  # Two plots of variables
-> biplot(out, "ov", cex=c(0.7,0.6)) # Four plots (2 for objects, 2 for variables)
-> biplot(out, "b", cex=c(0.7,0.6))  # Two biplots
-> biplot(out, xlabs = NA, plot.axes = c(3,5))    # Plot axes 3, 5. No object names
-> biplot(out, plot.type="biplots", xlabs = NULL) # Replace object names by numbers
-> 
-> # Example using random numbers. No significant relationship is expected
-> mat1 <- matrix(rnorm(60),20,3)
-> mat2 <- matrix(rnorm(100),20,5)
-> out2 = CCorA(mat1, mat2, permutations=99)
-> out2
-
-Canonical Correlation Analysis
-
-Call:
-CCorA(Y = mat1, X = mat2, permutations = 99) 
-
-             Y X
-Matrix Ranks 3 5
-
-Pillai's trace:  0.6455578 
-
-Significance of Pillai's trace:
-from F-distribution:   0.70352 
-based on permutations: 0.69 
-Permutation: free
-Number of permutations: 99
- 
-                       CanAxis1 CanAxis2 CanAxis3
-Canonical Correlations  0.69691  0.38140     0.12
-
-                      Y | X   X | Y
-RDA R squares       0.17066  0.1368
-adj. RDA R squares -0.12553 -0.0250
-
-> biplot(out2, "b")
-> 
-> 
-> 
-> cleanEx()
-> nameEx("MDSrotate")
-> ### * MDSrotate
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: MDSrotate
-> ### Title: Rotate First MDS Dimension Parallel to an External Variable
-> ### Aliases: MDSrotate
-> ### Keywords: multivariate
-> 
-> ### ** Examples
-> 
-> data(varespec)
-> data(varechem)
-> mod <- monoMDS(vegdist(varespec))
-> mod <- with(varechem, MDSrotate(mod, pH))
-> plot(mod)
-> ef <- envfit(mod ~ pH, varechem, permutations = 0)
-> plot(ef)
-> ordisurf(mod ~ pH, varechem, knots = 1, add = TRUE)
-
-Family: gaussian 
-Link function: identity 
-
-Formula:
-y ~ poly(x1, 1) + poly(x2, 1)
-<environment: 0x647ee38>
-Total model degrees of freedom 3 
-
-REML score: -3.185099     
-> 
-> 
-> 
-> cleanEx()
-> nameEx("MOStest")
-> ### * MOStest
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: MOStest
-> ### Title: Mitchell-Olds & Shaw Test for the Location of Quadratic Extreme
-> ### Aliases: MOStest plot.MOStest fieller.MOStest profile.MOStest
-> ###   confint.MOStest
-> ### Keywords: models regression
-> 
-> ### ** Examples
-> 
-> ## The Al-Mufti data analysed in humpfit():
-> mass <- c(140,230,310,310,400,510,610,670,860,900,1050,1160,1900,2480)
-> spno <- c(1,  4,  3,  9, 18, 30, 20, 14,  3,  2,  3,  2,  5,  2)
-> mod <- MOStest(mass, spno)
-> ## Insignificant
-> mod
-
-Mitchell-Olds and Shaw test
-Null: hump of a quadratic linear predictor is at min or max
-
-Family: gaussian 
-Link function: identity 
-
-      hump        min        max 
-  46.89749  140.00000 2480.00000 
-***** Caution: hump/pit not bracketed by the data ******
-
-            min/max      F Pr(>F)
-hump at min     140 0.0006 0.9816
-hump at max    2480 0.3161 0.5852
-Combined                   0.9924
-> ## ... but inadequate shape of the curve
-> op <- par(mfrow=c(2,2), mar=c(4,4,1,1)+.1)
-> plot(mod)
-> ## Looks rather like log-link with Poisson error and logarithmic biomass
-> mod <- MOStest(log(mass), spno, family=quasipoisson)
-> mod
-
-Mitchell-Olds and Shaw test
-Null: hump of a quadratic linear predictor is at min or max
-
-Family: quasipoisson 
-Link function: log 
-
-     min     hump      max 
-4.941642 6.243371 7.816014 
-
-            min/max      F  Pr(>F)  
-hump at min  4.9416 7.1367 0.02174 *
-hump at max  7.8160 9.0487 0.01191 *
-Combined                   0.03338 *
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> plot(mod)
-> par(op)
-> ## Confidence Limits
-> fieller.MOStest(mod)
-   2.5 %   97.5 % 
-5.255827 6.782979 
-> confint(mod)
-   2.5 %   97.5 % 
-5.816021 6.574378 
-> plot(profile(mod))
-> 
-> 
-> 
-> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
-> cleanEx()
-> nameEx("RsquareAdj")
-> ### * RsquareAdj
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: RsquareAdj
-> ### Title: Adjusted R-square
-> ### Aliases: RsquareAdj RsquareAdj.default RsquareAdj.rda RsquareAdj.cca
-> ###   RsquareAdj.lm RsquareAdj.glm
-> ### Keywords: univar multivariate
-> 
-> ### ** Examples
-> 
-> data(mite)
-> data(mite.env)
-> ## rda
-> m <- rda(decostand(mite, "hell") ~  ., mite.env)
-> RsquareAdj(m)
-$r.squared
-[1] 0.5265047
-
-$adj.r.squared
-[1] 0.4367038
-
-> ## default method
-> RsquareAdj(0.8, 20, 5)
-[1] 0.7285714
-> 
-> 
-> 
-> cleanEx()
-> nameEx("SSarrhenius")
-> ### * SSarrhenius
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: SSarrhenius
-> ### Title: Self-Starting nls Species-Area Models
-> ### Aliases: SSarrhenius SSlomolino SSgitay SSgleason
-> ### Keywords: models
-> 
-> ### ** Examples
-> 
-> ## Get species area data: sipoo.area gives the areas of islands
-> example(sipoo)
-
-sipoo> data(sipoo)
-
-sipoo> ## Areas of the islands in hectares
-sipoo> sipoo.area <-  c(1.1, 2.1, 2.2, 3.1, 3.5, 5.8, 6, 6.1, 6.5, 11.4, 13,
-sipoo+ 14.5, 16.1 ,17.5, 28.7, 40.5, 104.5, 233) 
-> S <- specnumber(sipoo)
-> plot(S ~ sipoo.area, xlab = "Island Area (ha)", ylab = "Number of Species",
-+     ylim = c(1, max(S)))
-> ## The Arrhenius model
-> marr <- nls(S ~ SSarrhenius(sipoo.area, k, z))
-> marr
-Nonlinear regression model
-  model: S ~ SSarrhenius(sipoo.area, k, z)
-   data: parent.frame()
-     k      z 
-3.4062 0.4364 
- residual sum-of-squares: 78.1
-
-Number of iterations to convergence: 5 
-Achieved convergence tolerance: 1.056e-06
-> ## confidence limits from profile likelihood
-> confint(marr)
-Waiting for profiling to be done...
-       2.5%     97.5%
-k 2.6220312 4.3033906
-z 0.3813576 0.4944693
-> ## draw a line
-> xtmp <- seq(min(sipoo.area), max(sipoo.area), len=51)
-> lines(xtmp, predict(marr, newdata=data.frame(sipoo.area = xtmp)), lwd=2)
-> ## The normal way is to use linear regression on log-log data,
-> ## but this will be different from the previous:
-> mloglog <- lm(log(S) ~ log(sipoo.area))
-> mloglog
-
-Call:
-lm(formula = log(S) ~ log(sipoo.area))
-
-Coefficients:
-    (Intercept)  log(sipoo.area)  
-         1.0111           0.4925  
-
-> lines(xtmp, exp(predict(mloglog, newdata=data.frame(sipoo.area=xtmp))),
-+    lty=2)
-> ## Gleason: log-linear
-> mgle <- nls(S ~ SSgleason(sipoo.area, k, slope))
-> lines(xtmp, predict(mgle, newdata=data.frame(sipoo.area=xtmp)),
-+   lwd=2, col=2)
-> ## Gitay: quadratic of log-linear
-> mgit <- nls(S ~ SSgitay(sipoo.area, k, slope))
-> lines(xtmp, predict(mgit, newdata=data.frame(sipoo.area=xtmp)), 
-+   lwd=2, col = 3)
-> ## Lomolino: using original names of the parameters (Lomolino 2000):
-> mlom <- nls(S ~ SSlomolino(sipoo.area, Smax, A50, Hill))
-> mlom
-Nonlinear regression model
-  model: S ~ SSlomolino(sipoo.area, Smax, A50, Hill)
-   data: parent.frame()
-  Smax    A50   Hill 
-53.493 94.697  2.018 
- residual sum-of-squares: 55.37
-
-Number of iterations to convergence: 6 
-Achieved convergence tolerance: 9.715e-07
-> lines(xtmp, predict(mlom, newdata=data.frame(sipoo.area=xtmp)), 
-+   lwd=2, col = 4)
-> ## One canned model of standard R:
-> mmic <- nls(S ~ SSmicmen(sipoo.area, slope, Asym))
-> lines(xtmp, predict(mmic, newdata = data.frame(sipoo.area=xtmp)),
-+   lwd =2, col = 5)
-> legend("bottomright", c("Arrhenius", "log-log linear", "Gleason", "Gitay", 
-+   "Lomolino", "Michaelis-Menten"), col=c(1,1,2,3,4,5), lwd=c(2,1,2,2,2,2), 
-+    lty=c(1,2,1,1,1,1))
-> ## compare models (AIC)
-> allmods <- list(Arrhenius = marr, Gleason = mgle, Gitay = mgit, 
-+    Lomolino = mlom, MicMen= mmic)
-> sapply(allmods, AIC)
-Arrhenius   Gleason     Gitay  Lomolino    MicMen 
- 83.49847  96.94018  80.54984  79.30718  83.02003 
-> 
-> 
-> 
-> cleanEx()
-> nameEx("add1.cca")
-> ### * add1.cca
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: add1.cca
-> ### Title: Add or Drop Single Terms to a Constrained Ordination Model
-> ### Aliases: add1.cca drop1.cca
-> ### Keywords: multivariate models
-> 
-> ### ** Examples
-> 
-> data(dune)
-> data(dune.env)
-> ## Automatic model building based on AIC but with permutation tests
-> step(cca(dune ~  1, dune.env), reformulate(names(dune.env)), test="perm")
-Start:  AIC=87.66
-dune ~ 1
-
-             Df    AIC      F Pr(>F)   
-+ Moisture    3 86.608 2.2536  0.005 **
-+ Management  3 86.935 2.1307  0.005 **
-+ A1          1 87.411 2.1400  0.025 * 
-<none>          87.657                 
-+ Manure      4 88.832 1.5251  0.045 * 
-+ Use         2 89.134 1.1431  0.295   
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-
-Step:  AIC=86.61
-dune ~ Moisture
-
-             Df    AIC      F Pr(>F)   
-<none>          86.608                 
-+ Management  3 86.813 1.4565  0.045 * 
-+ A1          1 86.992 1.2624  0.150   
-+ Use         2 87.259 1.2760  0.120   
-+ Manure      4 87.342 1.3143  0.040 * 
-- Moisture    3 87.657 2.2536  0.010 **
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-Call: cca(formula = dune ~ Moisture, data = dune.env)
-
-              Inertia Proportion Rank
-Total          2.1153     1.0000     
-Constrained    0.6283     0.2970    3
-Unconstrained  1.4870     0.7030   16
-Inertia is mean squared contingency coefficient 
-
-Eigenvalues for constrained axes:
-  CCA1   CCA2   CCA3 
-0.4187 0.1330 0.0766 
-
-Eigenvalues for unconstrained axes:
-   CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8    CA9   CA10   CA11 
-0.4098 0.2259 0.1761 0.1234 0.1082 0.0908 0.0859 0.0609 0.0566 0.0467 0.0419 
-  CA12   CA13   CA14   CA15   CA16 
-0.0201 0.0143 0.0099 0.0085 0.0080 
-
-> ## see ?ordistep to do the same, but based on permutation P-values
-> ## Not run: 
-> ##D ordistep(cca(dune ~  1, dune.env), reformulate(names(dune.env)), perm.max=200)
-> ## End(Not run)
-> ## Manual model building
-> ## -- define the maximal model for scope
-> mbig <- rda(dune ~  ., dune.env)
-> ## -- define an empty model to start with
-> m0 <- rda(dune ~ 1, dune.env)
-> ## -- manual selection and updating
-> add1(m0, scope=formula(mbig), test="perm")
-           Df    AIC      F Pr(>F)   
-<none>        89.620                 
-A1          1 89.591 1.9217  0.060 . 
-Moisture    3 87.707 2.5883  0.005 **
-Management  3 87.082 2.8400  0.005 **
-Use         2 91.032 1.1741  0.280   
-Manure      4 89.232 1.9539  0.015 * 
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> m0 <- update(m0, . ~ . + Management)
-> add1(m0, scope=formula(mbig), test="perm")
-         Df    AIC      F Pr(>F)   
-<none>      87.082                 
-A1        1 87.424 1.2965  0.175   
-Moisture  3 85.567 1.9764  0.005 **
-Use       2 88.284 1.0510  0.440   
-Manure    3 87.517 1.3902  0.095 . 
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> m0 <- update(m0, . ~ . + Moisture)
-> ## -- included variables still significant?
-> drop1(m0, test="perm")
-           Df    AIC      F Pr(>F)   
-<none>        85.567                 
-Management  3 87.707 2.1769  0.010 **
-Moisture    3 87.082 1.9764  0.005 **
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> add1(m0, scope=formula(mbig), test="perm")
-       Df    AIC      F Pr(>F)
-<none>    85.567              
-A1      1 86.220 0.8359  0.645
-Use     2 86.842 0.8027  0.700
-Manure  3 85.762 1.1225  0.320
-> 
-> 
-> 
-> cleanEx()
-> nameEx("adipart")
-> ### * adipart
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: adipart
-> ### Title: Additive Diversity Partitioning and Hierarchical Null Model
-> ###   Testing
-> ### Aliases: adipart adipart.default adipart.formula hiersimu
-> ###   hiersimu.default hiersimu.formula
-> ### Keywords: multivariate
-> 
-> ### ** Examples
-> 
-> ## NOTE: 'nsimul' argument usually needs to be >= 99
-> ## here much lower value is used for demonstration
-> 
-> data(mite)
-> data(mite.xy)
-> data(mite.env)
-> ## Function to get equal area partitions of the mite data
-> cutter <- function (x, cut = seq(0, 10, by = 2.5)) {
-+     out <- rep(1, length(x))
-+     for (i in 2:(length(cut) - 1))
-+         out[which(x > cut[i] & x <= cut[(i + 1)])] <- i
-+     return(out)}
-> ## The hierarchy of sample aggregation
-> levsm <- with(mite.xy, data.frame(
-+     l1=1:nrow(mite),
-+     l2=cutter(y, cut = seq(0, 10, by = 2.5)),
-+     l3=cutter(y, cut = seq(0, 10, by = 5)),
-+     l4=cutter(y, cut = seq(0, 10, by = 10))))
-> ## Let's see in a map
-> par(mfrow=c(1,3))
-> plot(mite.xy, main="l1", col=as.numeric(levsm$l1)+1, asp = 1)
-> plot(mite.xy, main="l2", col=as.numeric(levsm$l2)+1, asp = 1)
-> plot(mite.xy, main="l3", col=as.numeric(levsm$l3)+1, asp = 1)
-> par(mfrow=c(1,1))
-> ## Additive diversity partitioning
-> adipart(mite, index="richness", nsimul=19)
-adipart object
-
-Call: adipart(y = mite, index = "richness", nsimul = 19)
-
-nullmodel method ‘r2dtable’ with 19 simulations
-options:  index richness, weights unif
-alternative hypothesis: statistic is less or greater than simulated values
-
-        statistic      z   mean   2.5%    50%  97.5% Pr(sim.)  
-alpha.1    15.114 -38.43 22.344 22.032 22.300 22.608     0.05 *
-gamma      35.000   0.00 35.000 35.000 35.000 35.000     1.00  
-beta.1     19.886  38.43 12.656 12.392 12.700 12.968     0.05 *
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> adipart(mite ~ ., levsm, index="richness", nsimul=19)
-adipart object
-
-Call: adipart(formula = mite ~ ., data = levsm, index = "richness",
-nsimul = 19)
-
-nullmodel method ‘r2dtable’ with 19 simulations
-options:  index richness, weights unif
-alternative hypothesis: statistic is less or greater than simulated values
-
-        statistic        z     mean     2.5%      50%   97.5% Pr(sim.)  
-alpha.1    15.114 -46.2370 22.39624 22.12571 22.44286 22.6236     0.05 *
-alpha.2    29.750 -21.7076 34.81579 34.36250 35.00000 35.0000     0.05 *
-alpha.3    33.000   0.0000 35.00000 35.00000 35.00000 35.0000     0.05 *
-gamma      35.000   0.0000 35.00000 35.00000 35.00000 35.0000     1.00  
-beta.1     14.636   9.0407 12.41955 12.00750 12.42857 12.8743     0.05 *
-beta.2      3.250  13.1373  0.18421  0.00000  0.00000  0.6375     0.05 *
-beta.3      2.000   0.0000  0.00000  0.00000  0.00000  0.0000     0.05 *
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> ## Hierarchical null model testing
-> ## diversity analysis (similar to adipart)
-> hiersimu(mite, FUN=diversity, relative=TRUE, nsimul=19)
-hiersimu object
-
-Call: hiersimu(y = mite, FUN = diversity, relative = TRUE, nsimul = 19)
-
-nullmodel method ‘r2dtable’ with 19 simulations
-
-alternative hypothesis: statistic is less or greater than simulated values
-
-        statistic       z    mean    2.5%     50%  97.5% Pr(sim.)  
-level_1   0.76064 -71.195 0.93904 0.93487 0.93856 0.9444     0.05 *
-leve_2    1.00000   0.000 1.00000 1.00000 1.00000 1.0000     1.00  
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> hiersimu(mite ~., levsm, FUN=diversity, relative=TRUE, nsimul=19)
-hiersimu object
-
-Call: hiersimu(formula = mite ~ ., data = levsm, FUN = diversity,
-relative = TRUE, nsimul = 19)
-
-nullmodel method ‘r2dtable’ with 19 simulations
-
-alternative hypothesis: statistic is less or greater than simulated values
-
-   statistic        z    mean    2.5%     50%  97.5% Pr(sim.)  
-l1   0.76064  -75.139 0.93833 0.93389 0.93819 0.9427     0.05 *
-l2   0.89736 -110.968 0.99811 0.99699 0.99814 0.9999     0.05 *
-l3   0.92791 -417.338 0.99940 0.99904 0.99943 0.9996     0.05 *
-l4   1.00000    0.000 1.00000 1.00000 1.00000 1.0000     1.00  
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> ## Hierarchical testing with the Morisita index
-> morfun <- function(x) dispindmorisita(x)$imst
-> hiersimu(mite ~., levsm, morfun, drop.highest=TRUE, nsimul=19)
-hiersimu object
-
-Call: hiersimu(formula = mite ~ ., data = levsm, FUN = morfun,
-drop.highest = TRUE, nsimul = 19)
-
-nullmodel method ‘r2dtable’ with 19 simulations
-
-alternative hypothesis: statistic is less or greater than simulated values
-
-   statistic       z      mean      2.5%       50%   97.5% Pr(sim.)  
-l1   0.52070  8.5216  0.353253  0.322624  0.351073  0.3848     0.05 *
-l2   0.60234 14.3854  0.153047  0.096700  0.150434  0.1969     0.05 *
-l3   0.67509 20.3162 -0.182473 -0.234793 -0.195937 -0.0988     0.05 *
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> 
-> 
-> 
-> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
-> cleanEx()
-> nameEx("adonis")
-> ### * adonis
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: adonis
-> ### Title: Permutational Multivariate Analysis of Variance Using Distance
-> ###   Matrices
-> ### Aliases: adonis
-> ### Keywords: multivariate nonparametric
-> 
-> ### ** Examples
-> 
-> data(dune)
-> data(dune.env)
-> adonis(dune ~ Management*A1, data=dune.env, permutations=99)
-
-Call:
-adonis(formula = dune ~ Management * A1, data = dune.env, permutations = 99) 
-
-Permutation: free
-Number of permutations: 99
-
-Terms added sequentially (first to last)
-
-              Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)   
-Management     3    1.4686 0.48953  3.2629 0.34161   0.01 **
-A1             1    0.4409 0.44089  2.9387 0.10256   0.04 * 
-Management:A1  3    0.5892 0.19639  1.3090 0.13705   0.23   
-Residuals     12    1.8004 0.15003         0.41878          
-Total         19    4.2990                 1.00000          
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> 
-> 
-> ### Example of use with strata, for nested (e.g., block) designs.
-> 
-> dat <- expand.grid(rep=gl(2,1), NO3=factor(c(0,10)),field=gl(3,1) )
-> dat
-   rep NO3 field
-1    1   0     1
-2    2   0     1
-3    1  10     1
-4    2  10     1
-5    1   0     2
-6    2   0     2
-7    1  10     2
-8    2  10     2
-9    1   0     3
-10   2   0     3
-11   1  10     3
-12   2  10     3
-> Agropyron <- with(dat, as.numeric(field) + as.numeric(NO3)+2) +rnorm(12)/2
-> Schizachyrium <- with(dat, as.numeric(field) - as.numeric(NO3)+2) +rnorm(12)/2
-> total <- Agropyron + Schizachyrium
-> dotplot(total ~ NO3, dat, jitter.x=TRUE, groups=field,
-+         type=c('p','a'), xlab="NO3", auto.key=list(columns=3, lines=TRUE) )
-> 
-> Y <- data.frame(Agropyron, Schizachyrium)
-> mod <- metaMDS(Y)
-Run 0 stress 0.08556586 
-Run 1 stress 0.1560544 
-Run 2 stress 0.08556586 
-... New best solution
-... procrustes: rmse 1.09439e-06  max resid 1.88838e-06 
-*** Solution reached
-> plot(mod)
-> ### Hulls show treatment
-> with(dat, ordihull(mod, group=NO3, show="0"))
-> with(dat, ordihull(mod, group=NO3, show="10", col=3))
-> ### Spider shows fields
-> with(dat, ordispider(mod, group=field, lty=3, col="red"))
-> 
-> ### Correct hypothesis test (with strata)
-> adonis(Y ~ NO3, data=dat, strata=dat$field, perm=999)
-
-Call:
-adonis(formula = Y ~ NO3, data = dat, permutations = 999, strata = dat$field) 
-
-Blocks:  strata 
-Permutation: free
-Number of permutations: 999
-
-Terms added sequentially (first to last)
-
-          Df SumsOfSqs  MeanSqs F.Model      R2 Pr(>F)   
-NO3        1  0.055856 0.055856  4.0281 0.28714  0.009 **
-Residuals 10  0.138667 0.013867         0.71286          
-Total     11  0.194524                  1.00000          
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> 
-> ### Incorrect (no strata)
-> adonis(Y ~ NO3, data=dat, perm=999)
-
-Call:
-adonis(formula = Y ~ NO3, data = dat, permutations = 999) 
-
-Permutation: free
-Number of permutations: 999
-
-Terms added sequentially (first to last)
-
-          Df SumsOfSqs  MeanSqs F.Model      R2 Pr(>F)   
-NO3        1  0.055856 0.055856  4.0281 0.28714  0.005 **
-Residuals 10  0.138667 0.013867         0.71286          
-Total     11  0.194524                  1.00000          
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> 
-> 
-> 
-> cleanEx()
-> nameEx("anosim")
-> ### * anosim
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: anosim
-> ### Title: Analysis of Similarities
-> ### Aliases: anosim summary.anosim plot.anosim
-> ### Keywords: multivariate nonparametric htest
-> 
-> ### ** Examples
-> 
-> data(dune)
-> data(dune.env)
-> dune.dist <- vegdist(dune)
-> attach(dune.env)
-> dune.ano <- anosim(dune.dist, Management)
-> summary(dune.ano)
-
-Call:
-anosim(dat = dune.dist, grouping = Management) 
-Dissimilarity: bray 
-
-ANOSIM statistic R: 0.2579 
-      Significance: 0.017 
-
-Permutation: free
-Number of permutations: 999
-
-Upper quantiles of permutations (null model):
-  90%   95% 97.5%   99% 
-0.121 0.174 0.222 0.276 
-
-Dissimilarity ranks between and within classes:
-        0%   25%    50%     75%  100%   N
-Between  4 58.50 104.00 145.500 188.0 147
-BF       5 15.25  25.50  41.250  57.0   3
-HF       1  7.25  46.25  68.125  89.5  10
-NM       6 64.75 124.50 156.250 181.0  15
-SF       3 32.75  53.50  99.250 184.0  15
-
-> plot(dune.ano)
-Warning in bxp(list(stats = c(4, 58.5, 104, 145.5, 188, 5, 15.25, 25.5,  :
-  some notches went outside hinges ('box'): maybe set notch=FALSE
-> 
-> 
-> 
-> cleanEx()
-
-detaching ‘dune.env’
-
-> nameEx("anova.cca")
-> ### * anova.cca
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: anova.cca
-> ### Title: Permutation Test for Constrained Correspondence Analysis,
-> ###   Redundancy Analysis and Constrained Analysis of Principal Coordinates
-> ### Aliases: anova.cca permutest permutest.cca
-> ### Keywords: multivariate htest
-> 
-> ### ** Examples
-> 
-> data(varespec)
-> data(varechem)
-> vare.cca <- cca(varespec ~ Al + P + K, varechem)
-> ## overall test
-> anova(vare.cca)
-Permutation test for cca under reduced model
-Permutation: free
-Number of permutations: 999
-
-Model: cca(formula = varespec ~ Al + P + K, data = varechem)
-         Df ChiSquare     F Pr(>F)    
-Model     3   0.64413 2.984  0.001 ***
-Residual 20   1.43906                 
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-> 
-> 
-> 
-> cleanEx()
-> nameEx("as.mlm")
-> ### * as.mlm
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: as.mlm.cca
-> ### Title: Refit Constrained Ordination as a Multiple Response Linear Model
-> ### Aliases: as.mlm as.mlm.cca as.mlm.rda
-> ### Keywords: models multivariate
-> 
-> ### ** Examples
-> 
-> data(varespec)
-> data(varechem)
-> mod <- cca(varespec ~ Al + P + K, data=varechem)
-> lmod <- as.mlm(mod)
-> ## Coefficients
-> lmod
-
-Call:
-lm(formula = wa ~ . - 1, data = as.data.frame(X))
-
-Coefficients:
-    CCA1       CCA2       CCA3     
-Al   0.007479  -0.001884   0.003381
-P   -0.006491  -0.102190  -0.022307
-K   -0.006756   0.015344   0.017067
-
-> coef(mod)
-           CCA1         CCA2         CCA3
-Al  0.007478556 -0.001883637  0.003380774
-P  -0.006491081 -0.102189737 -0.022306682
-K  -0.006755568  0.015343662  0.017067351
-> ## Influential observations
-> influence.measures(lmod)
-Influence measures of
-	 lm(formula = wa ~ . - 1, data = as.data.frame(X)) :
-
-      dfb.Al    dfb.P    dfb.K     CCA1    CCA2      CCA3  cov.r   CCA1.1
-18 -0.251387  0.00976 -0.06310  0.27401  0.1806 -0.118754 0.0265 7.38e-03
-15  0.099858  0.13864 -0.11781 -0.16542 -0.0935  0.006898 0.0319 2.86e-03
-24 -0.003448 -0.44078  0.20788 -0.48239 -0.1750 -0.260788 0.0307 2.33e-02
-27  0.071682 -0.01707 -0.03516 -0.10185 -0.1676  0.022271 0.0406 1.13e-03
-23 -0.116533  0.06900 -0.02545  0.14407  0.2918 -0.220457 0.0355 2.23e-03
-19 -0.007394 -0.01169  0.01080  0.01360 -0.2318 -0.000417 0.0359 2.02e-05
-22  0.150916  0.14845 -0.13091 -0.20466  0.3815  0.168914 0.0376 4.50e-03
-16  0.107456  0.17900 -0.09917 -0.21196  0.2250  0.194432 0.0338 4.75e-03
-28  0.332161 -0.34398 -0.05414 -0.67745  0.0742  0.620990 0.0364 4.65e-02
-13  0.366880 -1.00834  1.23685  1.33919  0.4102  0.277067 0.1124 1.89e-01
-14  0.024147  0.02512 -0.01161 -0.03608  0.1491  0.053638 0.0355 1.42e-04
-20  0.000747 -0.00560  0.00205 -0.00661  0.2935 -0.190351 0.0368 4.77e-06
-25  0.166736 -0.11049  0.09341 -0.20954 -0.1627 -0.070753 0.0346 4.66e-03
-7  -0.397145  0.15747  0.15662 -0.59116  0.5842 -0.838287 0.0327 3.51e-02
-5  -0.279996 -0.09119 -0.35616  0.73579  0.3694 -0.326563 0.0281 5.18e-02
-6   0.003191 -0.00168 -0.01550  0.02590  0.3447  0.201072 0.0400 7.34e-05
-3  -0.302851 -0.07889  0.25932 -0.41958 -0.2766  0.536017 0.0386 1.85e-02
-4  -0.058151 -0.02719  0.00870 -0.06644  0.8199  0.131003 0.0486 4.83e-04
-2   0.020380  0.00416 -0.00373  0.02055 -0.4158 -0.160401 0.0395 4.62e-05
-9   0.074217  0.09551 -0.10857  0.12712 -0.3481  0.644579 0.0383 1.75e-03
-12 -0.097825 -0.20830  0.04637  0.28644 -0.6601  0.270324 0.0280 8.19e-03
-10  0.149178  0.66594 -0.12975  0.89348 -0.2510  0.000571 0.0118 5.90e-02
-11  0.014687  0.00691  0.00105  0.01913  0.1838 -0.301086 0.0377 4.00e-05
-21  0.148213  0.15461 -0.02915 -0.25306 -0.1892 -0.318491 0.0361 6.81e-03
-     CCA2.1   CCA3.1    hat inf
-18 0.003207 1.39e-03 0.0321    
-15 0.000915 4.98e-06 0.0295    
-24 0.003071 6.82e-03 0.1135    
-27 0.003062 5.41e-05 0.1375    
-23 0.009151 5.22e-03 0.0555    
-19 0.005873 1.90e-08 0.0176    
-22 0.015648 3.07e-03 0.1077    
-16 0.005348 3.99e-03 0.0594    
-28 0.000559 3.91e-02 0.2256    
-13 0.017773 8.11e-03 0.7168   *
-14 0.002424 3.13e-04 0.0158    
-20 0.009421 3.96e-03 0.0393    
-25 0.002810 5.31e-04 0.0670    
-7  0.034274 7.06e-02 0.1635    
-5  0.013057 1.02e-02 0.1588    
-6  0.012996 4.42e-03 0.1169    
-3  0.008056 3.02e-02 0.1833    
-4  0.073491 1.88e-03 0.2741    
-2  0.018909 2.81e-03 0.1063    
-9  0.013158 4.51e-02 0.0978    
-12 0.043487 7.29e-03 0.0409    
-10 0.004658 2.41e-08 0.0768    
-11 0.003694 9.91e-03 0.0632    
-21 0.003807 1.08e-02 0.1009    
-> plot(mod, type = "n")
-> points(mod, cex = 10*hatvalues(lmod), pch=16, xpd = TRUE)
-> text(mod, display = "bp", col = "blue") 
-> 
-> 
-> 
-> cleanEx()
-> nameEx("beals")
-> ### * beals
-> 
-> flush(stderr()); flush(stdout())
-> 
-> ### Name: beals
-> ### Title: Beals Smoothing and Degree of Absence
-> ### Aliases: beals swan
-> ### Keywords: manip smooth
-> 
-> ### ** Examples
-> 
-> data(dune)
-> ## Default
-> x <- beals(dune)
-> ## Remove target species
-> x <- beals(dune, include = FALSE)
-> ## Smoothed values against presence or absence of species
-> pa <- decostand(dune, "pa")
-> boxplot(as.vector(x) ~ unlist(pa), xlab="Presence", ylab="Beals")
-> ## Remove the bias of tarbet species: Yields lower values.
-> beals(dune, type =3, include = FALSE)
-     Achimill   Agrostol   Airaprae  Alopgeni   Anthodor  Bellpere   Bromhord
-1  0.49590853 0.38333415 0.01157407 0.4923280 0.30827883 0.4935662 0.43263047
-2  0.47083676 0.39501120 0.03361524 0.4718807 0.34723984 0.4917791 0.42000984
-3  0.34063019 0.52738394 0.01520046 0.5309152 0.21609954 0.4033301 0.33010938
-4  0.30816435 0.51198853 0.02876960 0.5971801 0.21542662 0.4398775 0.35732610
-5  0.59949785 0.27622698 0.06632771 0.3349203 0.48876285 0.4322142 0.44309579
-6  0.58819821 0.26299306 0.05967771 0.2700508 0.53154426 0.3696613 0.39760652
-7  0.56496165 0.29412293 0.05329633 0.3403047 0.48010987 0.4051777 0.40471531
-8  0.21230502 0.66906674 0.02588333 0.5187956 0.16247716 0.2720122 0.21219877
-9  0.30323659 0.59744543 0.02213662 0.5792855 0.21896113 0.3292320 0.28613526
-10 0.54083871 0.26902092 0.07349127 0.3372958 0.42671693 0.4705094 0.42934344
-11 0.40509331 0.31656550 0.10259239 0.3185489 0.38766111 0.3713794 0.31413659
-12 0.21008725 0.66278454 0.03625297 0.5753377 0.20078932 0.2802946 0.22974415
-13 0.21850759 0.68239707 0.02191119 0.6404427 0.16737280 0.2939740 0.24942466
-14 0.13570397 0.76284476 0.02298398 0.4107645 0.12128973 0.1682755 0.13757552
-15 0.09168815 0.79412733 0.02538032 0.4505613 0.10117099 0.1420251 0.09794548
-16 0.06335463 0.87877202 0.00742115 0.5232448 0.05538377 0.1516354 0.09458531
-17 0.55254140 0.07330247 0.29233391 0.1013889 0.69331132 0.3129358 0.34982363
-18 0.37751017 0.34451209 0.08535723 0.2838834 0.36918166 0.3676424 0.30478244
-19 0.29826049 0.25952255 0.35137675 0.1934048 0.51929869 0.2237843 0.18074796
-20 0.05429986 0.76675441 0.06144615 0.4063662 0.10738280 0.1450721 0.06706410
-      Chenalbu   Cirsarve    Comapalu   Eleopalu  Elymrepe   Empenigr
-1  0.025132275 0.09504980 0.000000000 0.05592045 0.4667439 0.00000000
-2  0.043866562 0.08570299 0.026548839 0.08656209 0.4407282 0.01829337
-3  0.065338638 0.08967477 0.031898812 0.16099072 0.4137888 0.01074444
-4  0.057970906 0.12920228 0.039859621 0.16112450 0.4399661 0.02527165
-5  0.026434737 0.05520104 0.015892090 0.05419613 0.3575948 0.03029752
-6  0.021256367 0.03223112 0.030347896 0.08784329 0.3138879 0.03093489
-7  0.038467708 0.04706743 0.017083997 0.06694311 0.3586644 0.02304603
-8  0.063278453 0.06688407 0.100703044 0.29777644 0.3046956 0.02102222
-9  0.069879277 0.07647268 0.045830682 0.19018562 0.3523460 0.01838883
-10 0.025686639 0.06037513 0.029746617 0.07787078 0.3736128 0.03425596
-11 0.021234732 0.05778318 0.035740922 0.11146095 0.2884798 0.07310076
-12 0.103543341 0.07799259 0.045375827 0.19518888 0.3354080 0.03413656
-13 0.122547745 0.07905124 0.056084315 0.22437598 0.3511708 0.01840390
-14 0.042990591 0.03618335 0.241811837 0.55982776 0.1428372 0.01989756
-15 0.035609053 0.04022968 0.198176675 0.53973883 0.1462975 0.02215971
-16 0.056246994 0.05184498 0.201352298 0.51523810 0.1832397 0.00742115
-17 0.007716049 0.01049383 0.009876543 0.02777778 0.1929470 0.21968254
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/vegan -r 2909


More information about the Vegan-commits mailing list