CombinationGeneratorCallback-class: A callback type for processing combinations

Description Objects from the Class Slots Extends Methods Author(s) References See Also Examples

Description

This function type extends CallbackFunction-class and is used to specify that the particular function needs to be invoked to obtain the actual function used as the callback. In this way, the object is a generator function that returns the actual callback function. This class acts as a form of stronger type checking than simply allowing functions or CallbackFunction-class objects.

Objects from the Class

Objects can be created by calls of the form new("CombinationGeneratorCallback", ...).

Slots

.Data:

the function object

Extends

Class "CallbackFunction", directly. Class "function", by class "CallbackFunction". Class "OptionalFunction", by class "CallbackFunction". Class "PossibleMethod", by class "CallbackFunction".

Methods

No methods defined with class "CombinationGeneratorCallback" in the signature.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

S4 classes and methods.

See Also

CallbackFunction-class combinations

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
SampledMean =
  function(data) {
    function(idx)
        mean(data[idx])
  }

myData = rnorm(10)
f = SampledMean(myData)
new("CombinationGeneratorCallback", f)

vals = sapply(1:100, function(i) f(sample(1:10, replace = TRUE)))
summary(vals)

omegahat/Combinations documentation built on May 24, 2019, 1:51 p.m.