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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 27 14:50:02 CEST 2011


Author: jarioksa
Date: 2011-09-27 14:50:02 +0200 (Tue, 27 Sep 2011)
New Revision: 1901

Added:
   pkg/vegan/R/str.nullmodel.R
Modified:
   pkg/vegan/NAMESPACE
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/nullmodel.Rd
   pkg/vegan/tests/Examples/vegan-Ex.Rout.save
Log:
add str.nullmodel()

Modified: pkg/vegan/NAMESPACE
===================================================================
--- pkg/vegan/NAMESPACE	2011-09-27 07:30:37 UTC (rev 1900)
+++ pkg/vegan/NAMESPACE	2011-09-27 12:50:02 UTC (rev 1901)
@@ -63,7 +63,7 @@
 ## Registration of S3 methods
 import(stats)
 import(graphics)
-importFrom(utils, head, tail)
+importFrom(utils, head, tail, str)
 importFrom(lattice, densityplot)
 ## nobs only exists in R 2.13.0 -- import from permute with older R
 if (getRversion() < "2.13.0") {
@@ -360,6 +360,8 @@
 S3method(simulate, cca)
 S3method(simulate, rda)
 S3method(simulate, nullmodel)
+# str: utils
+S3method(str, nullmodel)
 # stressplot: vegan
 S3method(stressplot, default)
 S3method(stressplot, monoMDS)

Added: pkg/vegan/R/str.nullmodel.R
===================================================================
--- pkg/vegan/R/str.nullmodel.R	                        (rev 0)
+++ pkg/vegan/R/str.nullmodel.R	2011-09-27 12:50:02 UTC (rev 1901)
@@ -0,0 +1,2 @@
+`str.nullmodel` <-
+    function(object, ...) str(as.list(object), ...)

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2011-09-27 07:30:37 UTC (rev 1900)
+++ pkg/vegan/inst/ChangeLog	2011-09-27 12:50:02 UTC (rev 1901)
@@ -35,6 +35,11 @@
 	call should now be defined as as.integer() instead of old
 	as.double().
 
+	* str.nullmodel: new function to display the *str*ucture of the
+	"nullmodel". The "nullmodel" is an environment and therefore does
+	not show in usual str() although its items can be accessed with
+	$-notation. No documentation, but alias in nullmodel.Rd.
+
 	* New functions: commsim is used to define Null Model Algorithms
 	via a function that returns n x m x nsim array of simulated
 	matrices based on structural constraints. make.commsim contains

Modified: pkg/vegan/man/nullmodel.Rd
===================================================================
--- pkg/vegan/man/nullmodel.Rd	2011-09-27 07:30:37 UTC (rev 1900)
+++ pkg/vegan/man/nullmodel.Rd	2011-09-27 12:50:02 UTC (rev 1901)
@@ -3,6 +3,7 @@
 \alias{print.nullmodel}
 \alias{simulate.nullmodel}
 \alias{update.nullmodel}
+\alias{str.nullmodel}
 \alias{print.simmat}
 \title{
 Null Model and Simulation

Modified: pkg/vegan/tests/Examples/vegan-Ex.Rout.save
===================================================================
--- pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2011-09-27 07:30:37 UTC (rev 1900)
+++ pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2011-09-27 12:50:02 UTC (rev 1901)
@@ -161,7 +161,7 @@
 
 Formula:
 y ~ poly(x1, 1) + poly(x2, 1)
-<environment: 0x102611008>
+<environment: 0x1026163c0>
 Total model degrees of freedom 3 
 
 GCV score: 0.0427924
@@ -4183,7 +4183,7 @@
 > ### Name: nullmodel
 > ### Title: Null Model and Simulation
 > ### Aliases: nullmodel print.nullmodel simulate.nullmodel update.nullmodel
-> ###   print.simmat
+> ###   str.nullmodel print.simmat
 > ### Keywords: multivariate datagen
 > 
 > ### ** Examples
@@ -5004,7 +5004,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x107232ca0>
+<environment: 0x1071a1e28>
 
 Estimated degrees of freedom:
 6.4351  total = 7.435071 
@@ -5020,7 +5020,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x10785fc00>
+<environment: 0x1076bfb40>
 
 Estimated degrees of freedom:
 6.1039  total = 7.103853 
@@ -5176,7 +5176,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x104f32f78>
+<environment: 0x1045a2ed8>
 
 Estimated degrees of freedom:
 8.9275  total = 9.927492 
@@ -5189,7 +5189,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x1073aa3c0>
+<environment: 0x107995bf8>
 
 Estimated degrees of freedom:
 7.7529  total = 8.75294 
@@ -5202,7 +5202,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x107b7aca8>
+<environment: 0x1071a2158>
 
 Estimated degrees of freedom:
 8.8962  total = 9.89616 
@@ -7464,7 +7464,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x108031840>
+<environment: 0x107a3b340>
 
 Estimated degrees of freedom:
 2  total = 3 
@@ -7940,7 +7940,7 @@
 > ### * <FOOTER>
 > ###
 > cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  112.907 1.395 116.971 0 0 
+Time elapsed:  110.209 1.343 113.01 0 0 
 > grDevices::dev.off()
 null device 
           1 



More information about the Vegan-commits mailing list