RegistrerWrapper: Wrapper (un)registration routine

Description Usage Arguments Value Author(s) See Also Examples

Description

These function allows the registration and unregistration of a wrapper function to the all.fast or all methods of netbenchmark. After registring it wrapper.name function will belong to all.fast or all methods during the R session. Unregistring the wrapper.name function will remove it from all.fast or all methods during the R session.

Usage

1
2
    RegisterWrapper(wrapper.name=NULL,all.fast=TRUE)
    UnregisterWrapper(wrapper.name=NULL,all.fast=TRUE)

Arguments

wrapper.name

The character (vector) of wrapper names (default: NULL).

all.fast

Logical indicating if the wrapper.name should be added to all.fast or all methods (default: TRUE).

Value

Displays a message if the registration could be performed or not.

Author(s)

Pau Bellot, Catharina Olsen and Patrick E Meyer Maintainer: Pau Bellot <pau.bellot@upc.edu>

See Also

netbenchmark

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
    # Define a wrapper function
    Spearmancor <- function(data){
        cor(data,method="spearman")
    }
    ## Not run: 
        # Register it to all.fast methods
        RegisterWrapper("Spearmancor")
        # Register it to all methods
        RegisterWrapper("Spearmancor", all.fast=FALSE)
        # Unregister it from all.fast methods
        UnregisterWrapper("Spearmancor")
        # Unregister it from all methods
        UnregisterWrapper("Spearmancor", all.fast=FALSE)
    
## End(Not run)
    

netbenchmark documentation built on April 28, 2020, 7 p.m.