R/NULL-methods.R

Defines functions mkNumericHandlerMethod

###
### $Id: NULL-methods.R
###

requireNamespace("methods")
options(warn=1)


##
## Methods
##


##-----------------------------------------------------------------------------
mkNumericHandlerMethod <- function(methodName) {
    stopifnot(is.character(methodName) && length(methodName) == 1)

    ##-------------------------------------------------------------------------
    setMethod(methodName,
        signature(object="NULL"),
        function(object) {
            NA_real_
        })
}


methodNames <- c("normalize", "qcprob")
sapply(methodNames, mkNumericHandlerMethod)
rm(mkNumericHandlerMethod)

Try the RPPASPACE package in your browser

Any scripts or data that you put into this service are public.

RPPASPACE documentation built on Oct. 20, 2023, 1:08 a.m.