[Vegan-commits] r1700 - in pkg/vegan: . R inst man tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 8 20:22:13 CEST 2011


Author: jarioksa
Date: 2011-08-08 20:22:13 +0200 (Mon, 08 Aug 2011)
New Revision: 1700

Modified:
   pkg/vegan/NAMESPACE
   pkg/vegan/R/model.frame.cca.R
   pkg/vegan/R/model.matrix.cca.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/tolerance.Rd
   pkg/vegan/man/vegan-internal.Rd
   pkg/vegan/tests/Examples/vegan-Ex.Rout.save
Log:
NAMESPACE with maximal hiding of information of exports

Modified: pkg/vegan/NAMESPACE
===================================================================
--- pkg/vegan/NAMESPACE	2011-08-08 15:15:36 UTC (rev 1699)
+++ pkg/vegan/NAMESPACE	2011-08-08 18:22:13 UTC (rev 1700)
@@ -1,7 +1,51 @@
 ## compiled code
 useDynLib(vegan)
-## Export
-exportPattern(".")
+
+## Export regular function names (no dots)
+
+export(CCorA, MOStest, RsquareAdj, SSarrhenius, SSgitay, SSgleason,
+SSlomolino, adipart, adonis, anosim, beals, betadisper, betadiver,
+bgdispersal, bioenv, bstick, cIndexKM, calibrate, capscale, cascadeKM,
+cca, commsimulator, contribdiv, decorana, decostand, designdist,
+dispindmorisita, distconnected, diversity, downweight, drarefy,
+eigengrad, eigenvals, envfit, estaccumR, estimateR, factorfit,
+fisherfit, fitspecaccum, goodness, hiersimu, humpfit, indpower,
+inertcomp, initMDS, intersetcor, isomapdist, isomap, linestack,
+mantel, meandist, metaMDSdist, metaMDSiter, metaMDSredist,
+metaMDSrotate, metaMDS, monoMDS, mrpp, msoplot, mso, multipart,
+nestedchecker, nesteddisc, nestedn0, nestednodf, nestedtemp, oecosimu,
+orderingKM, ordiR2step, ordiarrows, ordicloud, ordicluster,
+ordiellipse, ordigrid, ordihull, ordilabel, ordimedian, ordiplot3d,
+ordiplot, ordipointlabel, ordiresids, ordirgl, ordisegments,
+ordispider, ordisplom, ordistep, ordisurf, orditkplot, orditorp,
+ordixyplot, orglpoints, orglsegments, orglspider, orgltext, pcnm,
+permatfull, permatswap, permutest, poolaccum, postMDS, prc,
+prestondistr, prestonfit, procrustes, protest, radfit, radlattice,
+rankindex, rarefy, rda, renyiaccum, renyi, rrarefy, scores,
+showvarparts, spandepth, spantree, specaccum, specnumber,
+specpool2vect, specpool, spenvcor, stepacross, stressplot, swan,
+taxa2dist, taxondive, tolerance, treedist, treedive, treeheight,
+tsallisaccum, tsallis, varpart, vectorfit, vegandocs, vegdist,
+vegemite, veiledspec, wascores, wcmdscale, wisconsin)
+
+## export regular functions with dot names
+
+export(as.fisher, as.mlm, as.preston, as.rad, fieller.MOStest,
+fisher.alpha, kendall.global, kendall.post, make.cepnames,
+mantel.correlog, mantel.partial, no.shared, rad.lognormal, rad.null,
+rad.preempt, rad.zipf, rad.zipfbrot, read.cep, rgl.isomap,
+rgl.renyiaccum, vif.cca)
+
+## Export panel functions
+export(panel.ordi, panel.ordi3d, prepanel.ordi3d)
+
+## do NOT export the following internal functions
+
+## export(ade2vegancca, coverscale, ordiArgAbsorber, ordiArrowMul,
+## ordiGetData, ordiNAexclude, ordiNApredict, ordiParseFormula,
+## ordiTerminfo, pasteCall, pregraphKM, simpleRDA2, varpart2,
+## varpart3, varpart4, veganCovEllipse)
+
 ## Registration of S3 methods
 import(stats)
 import(graphics)

Modified: pkg/vegan/R/model.frame.cca.R
===================================================================
--- pkg/vegan/R/model.frame.cca.R	2011-08-08 15:15:36 UTC (rev 1699)
+++ pkg/vegan/R/model.frame.cca.R	2011-08-08 18:22:13 UTC (rev 1700)
@@ -8,7 +8,7 @@
         0)
     call <- call[c(1, m)]
     call[[1]] <- as.name("ordiParseFormula")
-    out <- eval(call, parent.frame())
+    out <- eval(call, environment(), parent.frame())
     mf <- out$modelframe
     attr(mf, "terms") <- out$terms.expand
     if (!is.null(out$na.action)) 

Modified: pkg/vegan/R/model.matrix.cca.R
===================================================================
--- pkg/vegan/R/model.matrix.cca.R	2011-08-08 15:15:36 UTC (rev 1699)
+++ pkg/vegan/R/model.matrix.cca.R	2011-08-08 18:22:13 UTC (rev 1700)
@@ -8,7 +8,7 @@
         0)
     call <- call[c(1, m)]
     call[[1]] <- as.name("ordiParseFormula")
-    out <- eval(call, parent.frame())[c("Z", "Y")]
+    out <- eval(call, environment(), parent.frame())[c("Z", "Y")]
     m <- list()
     if (!is.null(out$Z))
         m$Conditions <- out$Z

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2011-08-08 15:15:36 UTC (rev 1699)
+++ pkg/vegan/inst/ChangeLog	2011-08-08 18:22:13 UTC (rev 1700)
@@ -4,13 +4,14 @@
 
 Version 1.91-0 (opened August 6, 2011)
 
-	* NAMESPACE: added namespace to vegan. At this stage exports
-	everything and loads compiled code (so that nothing changed in
-	from user's perspective). Some superfluous aliases were removed
-	with the registration of S3 methods, and scoping was changed a bit
-	in anova.ccabyterm. as.mcmc is not yet registred: it need changes
-	in Imports field of DESCRIPTION (same with vif.cca: vif is defined
-	in car, but we could have our private vif generic here?).
+	* NAMESPACE: added namespace to vegan. Currently hides all that
+	can be hidden, and exports only main functions: Some method
+	functions will be probably exported later. Superfluous aliases
+	were removed with the registration of S3 methods, and scoping was
+	changed a bit in anova.ccabyterm, model.matrix.cca and
+	model.frame.cca. as.mcmc is not yet registred: it need changes in
+	Imports field of DESCRIPTION (same with vif.cca: vif is defined in
+	car, but we could have our private vif generic here?).
 
 Version 1.90-2 (closed August 6, 2011)
 

Modified: pkg/vegan/man/tolerance.Rd
===================================================================
--- pkg/vegan/man/tolerance.Rd	2011-08-08 15:15:36 UTC (rev 1699)
+++ pkg/vegan/man/tolerance.Rd	2011-08-08 18:22:13 UTC (rev 1700)
@@ -40,8 +40,8 @@
 mod <- cca(dune ~ ., data = dune.env)
 
 ## defaults to species tolerances
-tolerance.cca(mod)
+tolerance(mod)
 
 ## sample heterogeneities for CCA axes 1:6
-tolerance.cca(mod, which = "sites", choices = 1:6)
+tolerance(mod, which = "sites", choices = 1:6)
 }

Modified: pkg/vegan/man/vegan-internal.Rd
===================================================================
--- pkg/vegan/man/vegan-internal.Rd	2011-08-08 15:15:36 UTC (rev 1699)
+++ pkg/vegan/man/vegan-internal.Rd	2011-08-08 18:22:13 UTC (rev 1700)
@@ -33,10 +33,12 @@
 veganCovEllipse(cov, center = c(0, 0), scale = 1, npoints = 100)
 }
 
-\details{
-  The description here is only intended for \pkg{vegan} developers:
-  these functions are not intended for users, but they only should be
-  used within functions
+\details{ The description here is only intended for \pkg{vegan}
+  developers: these functions are not intended for users, but they
+  only should be used within functions.  In general, these functions
+  are not exported to the namespace, but you must use
+  \code{\link{get}} or \code{\link{:::}} to directly call these
+  functions.
   
   \code{ordiGetData} finds the model frame of constraints and
   conditions in constrained ordination in the defined

Modified: pkg/vegan/tests/Examples/vegan-Ex.Rout.save
===================================================================
--- pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2011-08-08 15:15:36 UTC (rev 1699)
+++ pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2011-08-08 18:22:13 UTC (rev 1700)
@@ -1,5 +1,5 @@
 
-R version 2.13.0 beta (2011-04-04 r55296)
+R version 2.13.1 (2011-07-08)
 Copyright (C) 2011 The R Foundation for Statistical Computing
 ISBN 3-900051-07-0
 Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
@@ -4642,14 +4642,14 @@
 > vare.mds <- monoMDS(vare.dist)
 > with(varechem, ordisurf(vare.mds, Baresoil, bubble = 5))
 Loading required package: mgcv
-This is mgcv 1.7-5. For overview type 'help("mgcv-package")'.
+This is mgcv 1.7-6. For overview type 'help("mgcv-package")'.
 
 Family: gaussian 
 Link function: identity 
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x103a09710>
+<environment: 0x103dee498>
 
 Estimated degrees of freedom:
 6.4351  total = 7.435071 
@@ -4665,7 +4665,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x10601eb40>
+<environment: 0x104ee6fc0>
 
 Estimated degrees of freedom:
 6.0761  total = 7.076141 
@@ -4814,14 +4814,14 @@
 > ## Map of PCNMs in the sample plot
 > ordisurf(mite.xy, scores(pcnm1, choi=1), bubble = 4, main = "PCNM 1")
 Loading required package: mgcv
-This is mgcv 1.7-5. For overview type 'help("mgcv-package")'.
+This is mgcv 1.7-6. For overview type 'help("mgcv-package")'.
 
 Family: gaussian 
 Link function: identity 
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x1066de2a0>
+<environment: 0x1068afa00>
 
 Estimated degrees of freedom:
 8.9275  total = 9.927492 
@@ -4834,7 +4834,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x105d7a0d0>
+<environment: 0x1071b9158>
 
 Estimated degrees of freedom:
 7.7529  total = 8.75294 
@@ -4847,7 +4847,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x106799940>
+<environment: 0x107462a70>
 
 Estimated degrees of freedom:
 8.8962  total = 9.89616 
@@ -6349,7 +6349,7 @@
 > mod <- cca(dune ~ ., data = dune.env)
 > 
 > ## defaults to species tolerances
-> tolerance.cca(mod)
+> tolerance(mod)
 
 	Species Tolerances
 
@@ -6389,7 +6389,7 @@
 
 > 
 > ## sample heterogeneities for CCA axes 1:6
-> tolerance.cca(mod, which = "sites", choices = 1:6)
+> tolerance(mod, which = "sites", choices = 1:6)
 
 	Sample Heterogeneities
 
@@ -7032,14 +7032,14 @@
 > ## add fitted surface of diversity to the model
 > ordisurf(mod, diversity(dune), add = TRUE)
 Loading required package: mgcv
-This is mgcv 1.7-5. For overview type 'help("mgcv-package")'.
+This is mgcv 1.7-6. For overview type 'help("mgcv-package")'.
 
 Family: gaussian 
 Link function: identity 
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x1080ca318>
+<environment: 0x107a938a0>
 
 Estimated degrees of freedom:
 2  total = 3 
@@ -7504,7 +7504,7 @@
 > ### * <FOOTER>
 > ###
 > cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  118.169 1.253 120.445 0 0 
+Time elapsed:  99.645 1.025 101.043 0 0 
 > grDevices::dev.off()
 null device 
           1 



More information about the Vegan-commits mailing list