netbenchmark (version 1.4.2)

RegisterWrapper: Wrapper (un)registration routine

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

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.

See Also

netbenchmark

Examples

Run this code
# Define a wrapper function
    Spearmancor <- function(data){
        cor(data,method="spearman")
    }
    # 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)

Run the code above in your browser using DataLab