[Vegan-commits] r2770 - in pkg/permute: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Nov 30 17:10:33 CET 2013


Author: gsimpson
Date: 2013-11-30 17:10:33 +0100 (Sat, 30 Nov 2013)
New Revision: 2770

Modified:
   pkg/permute/NAMESPACE
   pkg/permute/R/getFoo-methods.R
   pkg/permute/man/get-methods.Rd
Log:
add 'getAllperms' extractor and method for class "how"

Modified: pkg/permute/NAMESPACE
===================================================================
--- pkg/permute/NAMESPACE	2013-11-29 02:30:51 UTC (rev 2769)
+++ pkg/permute/NAMESPACE	2013-11-30 16:10:33 UTC (rev 2770)
@@ -1,12 +1,40 @@
 ### Visible functions:
-export("allPerms", "Blocks", "numPerms", "check", "permCheck",
-       "permControl", "permute", "shuffle", "Within", "Plots",
-       "shuffleFree", "shuffleSeries", "shuffleGrid", "shuffleStrata",
-       "getBlocks", "getWithin", "getStrata", "getType", "getMirror",
-       "getConstant", "getPlots", "getRow", "getCol", "getDim",
-       "getNperm","getMaxperm", "getMinperm", "getComplete", "getMake",
-       "getObserved", "shuffleSet", "how",
+export("allPerms",
+       "Blocks",
+       "check",
+       "getBlocks",
+       "getWithin",
+       "getStrata",
+       "getType",
+       "getMirror",
+       "getConstant",
+       "getPlots",
+       "getRow",
+       "getCol",
+       "getDim",
+       "getNperm",
+       "getMaxperm",
+       "getMinperm",
+       "getComplete",
+       "getMake",
+       "getObserved",
+       "getAllperms",
+       "how",
+       "numPerms",
+       "permCheck",
+       "permControl",
+       "permute",
+       "Plots",
        "setBlocks<-",
+       "setWithin<-",
+       "setStrata<-",
+       "setType<-",
+       "setMirror<-",
+       "setConstant<-",
+       "setPlots<-",
+       "setRow<-",
+       "setCol<-",
+       "setDim<-",
        "setNperm<-",
        "setMaxperm<-",
        "setMinperm<-",
@@ -14,12 +42,13 @@
        "setMake<-",
        "setObserved<-",
        "setAllperms<-",
-       "setPlots<-",
-       "setWithin<-",
-       "setStrata<-",
-       "setRow<-",
-       "setCol<-",
-       "setDim<-"
+       "shuffle",
+       "shuffleFree",
+       "shuffleGrid",
+       "shuffleSeries",
+       "shuffleSet",
+       "shuffleStrata",
+       "Within"
        )
 
 ### Imports: nobs() only exists in R 2.13.0 for import. We define the
@@ -109,6 +138,8 @@
 S3method("getMake", "how")
 S3method("getObserved", "default")
 S3method("getObserved", "how")
+S3method("getAllperms", "default")
+S3method("getAllperms", "how")
 
 ## setFoo methods
 S3method("setBlocks<-", "default")

Modified: pkg/permute/R/getFoo-methods.R
===================================================================
--- pkg/permute/R/getFoo-methods.R	2013-11-29 02:30:51 UTC (rev 2769)
+++ pkg/permute/R/getFoo-methods.R	2013-11-30 16:10:33 UTC (rev 2770)
@@ -428,3 +428,16 @@
 `getObserved.how` <- function(object, ...) {
     object$observed
 }
+
+## Extractor for all.perms component
+`getAllperms` <- function(object, ...) {
+    UseMethod("getAllperms")
+}
+
+`getAllperms.how` <- function(object, ...) {
+    object$all.perms
+}
+
+`getAllperms.default` <- function(object, ...) {
+    stop("No default method for `getAllperms`")
+}

Modified: pkg/permute/man/get-methods.Rd
===================================================================
--- pkg/permute/man/get-methods.Rd	2013-11-29 02:30:51 UTC (rev 2769)
+++ pkg/permute/man/get-methods.Rd	2013-11-30 16:10:33 UTC (rev 2770)
@@ -74,6 +74,9 @@
 \alias{getObserved}
 \alias{getObserved.default}
 \alias{getObserved.how}
+\alias{getAllperms}
+\alias{getAllperms.default}
+\alias{getAllperms.how}
 
 \title{Extractor functions to access components of a permutation design}
 \description{
@@ -86,68 +89,71 @@
 }
 \usage{
 
-getWithin(object, ...)
-getPlots(object, ...)
+getAllperms(object, ...)
 getBlocks(object, ...)
-getStrata(object, ...)
-getType(object, ...)
-getMirror(object, ...)
+getComplete(object, ...)
 getConstant(object, ...)
 getCol(object, ...)
-getRow(object, ...)
 getDim(object, ...)
-getNperm(object, ...)
+getMake(object, ...)
 getMaxperm(object, ...)
 getMinperm(object, ...)
-getComplete(object, ...)
-getMake(object, ...)
+getMirror(object, ...)
+getNperm(object, ...)
 getObserved(object, ...)
+getPlots(object, ...)
+getRow(object, ...)
+getStrata(object, ...)
+getType(object, ...)
+getWithin(object, ...)
 
-\method{getWithin}{how}(object, ...)
+\method{getAllperms}{how}(object, ...)
 
-\method{getPlots}{how}(object, ...)
-
 \method{getBlocks}{how}(object, ...)
 
-\method{getStrata}{how}(object, which = c("plots", "blocks"),
-          drop = TRUE, ...)
-\method{getStrata}{Plots}(object, drop = TRUE, ...)
+\method{getCol}{how}(object, which = c("plots", "within"), ...)
+\method{getCol}{Plots}(object, ...)
+\method{getCol}{Within}(object, ...)
 
-\method{getType}{how}(object, which = c("plots", "within"), ...)
-\method{getType}{Plots}(object, ...)
-\method{getType}{Within}(object, ...)
+\method{getComplete}{how}(object, ...)
 
-\method{getMirror}{how}(object, which = c("plots", "within"), ...)
-\method{getMirror}{Plots}(object, ...)
-\method{getMirror}{Within}(object, ...)
-
 \method{getConstant}{how}(object, ...)
 \method{getConstant}{Within}(object, ...)
 
-\method{getCol}{how}(object, which = c("plots", "within"), ...)
-\method{getCol}{Plots}(object, ...)
-\method{getCol}{Within}(object, ...)
-
-\method{getRow}{how}(object, which = c("plots", "within"), ...)
-\method{getRow}{Plots}(object, ...)
-\method{getRow}{Within}(object, ...)
-
 \method{getDim}{how}(object, which = c("plots", "within"), ...)
 \method{getDim}{Plots}(object, ...)
 \method{getDim}{Within}(object, ...)
 
-\method{getNperm}{how}(object, ...)
+\method{getMake}{how}(object, ...)
 
 \method{getMaxperm}{how}(object, ...)
 
 \method{getMinperm}{how}(object, ...)
 
-\method{getComplete}{how}(object, ...)
+\method{getMirror}{how}(object, which = c("plots", "within"), ...)
+\method{getMirror}{Plots}(object, ...)
+\method{getMirror}{Within}(object, ...)
 
-\method{getMake}{how}(object, ...)
+\method{getNperm}{how}(object, ...)
 
 \method{getObserved}{how}(object, ...)
 
+\method{getPlots}{how}(object, ...)
+
+\method{getRow}{how}(object, which = c("plots", "within"), ...)
+\method{getRow}{Plots}(object, ...)
+\method{getRow}{Within}(object, ...)
+
+\method{getStrata}{how}(object, which = c("plots", "blocks"),
+          drop = TRUE, ...)
+\method{getStrata}{Plots}(object, drop = TRUE, ...)
+
+\method{getType}{how}(object, which = c("plots", "within"), ...)
+\method{getType}{Plots}(object, ...)
+\method{getType}{Within}(object, ...)
+
+\method{getWithin}{how}(object, ...)
+
 }
 
 \arguments{



More information about the Vegan-commits mailing list