search for: usefunct

Displaying 4 results from an estimated 4 matches for "usefunct".

Did you mean: defunct
2010 Sep 23
1
Behavior of R CMD build and library() w.r.t. setGeneric-like functions
...h(20100913) [1] "09" Behind the scenes, the guard command is using 'assign' to create a parent function with the name 'month'. This can be done explicitly as well, although it is typically not necessary. The parent definition looks like this: month <- function(...) UseFunction('month',...) The package works fine when I'm writing scripts, but all heck breaks loose when I try to write a package that depends on futile.paradigm. When I run R CMD check, it doesn't seem that the guard commands are being executed. A less likely hypothesis is that they are be...
2010 Oct 27
0
Introducing the futile.paradigm, a package for functional dispatching in R
...;fac' namespace fac.0 %when% (x == 0) # guard statement fac.0 <- function(x) 1 # function variant fac.n %when% (x > 0) # guard statement fac.n %must% (result >= x) # post-assertion fac.n <- function(x) x * fac(x-1) # function variant > fac(4) [1] 24 > fac(-2) Error in UseFunction("fac", ...) : No valid function for 'fac/1' : -2 # Numerical optimization with custom type constructors # Define a function and its derivatives fx <- function(x) x^2 - 4 f1 <- function(x) 2*x f2 <- function(x) 2 # Define the numerical optimization harness converged &...
2010 Oct 27
0
Introducing the futile.paradigm, a package for functional dispatching in R
...;fac' namespace fac.0 %when% (x == 0) # guard statement fac.0 <- function(x) 1 # function variant fac.n %when% (x > 0) # guard statement fac.n %must% (result >= x) # post-assertion fac.n <- function(x) x * fac(x-1) # function variant > fac(4) [1] 24 > fac(-2) Error in UseFunction("fac", ...) : No valid function for 'fac/1' : -2 # Numerical optimization with custom type constructors # Define a function and its derivatives fx <- function(x) x^2 - 4 f1 <- function(x) 2*x f2 <- function(x) 2 # Define the numerical optimization harness converged &...
2013 Aug 30
3
Type annotations for R function parameters.
Hello. One of my clients asked if it would be possible to have an IDE which could use type discovery for R functions to make flow-like construction of an R program. Something like a LabView graphical composition of processing elements. They called this type of program composition a "workflow". I looked at some of this programs, like: * Orange http://orange.biolab.si/ * RedR