Table of Contents
Fetching ...

Introducing the vfunc R package

Robin K. S. Hankin

Abstract

$f,g\colon\mathbb{R}\longrightarrow\mathbb{R}$, it is natural to define $f+g$ as the function that maps $x\in\mathbb{R}$ to $f(x) + g(x)$. However, in base R, objects of class function do not have arithmetic methods defined, so idiom such as "f + g" returns an error, even though it has a perfectly reasonable expectation. The vfunc package offers this functionality. Other similar features are provided, which lead to compact and readable idiom. A wide class of coding bugs is eliminated.

Introducing the vfunc R package

Abstract

, it is natural to define as the function that maps to . However, in base R, objects of class function do not have arithmetic methods defined, so idiom such as "f + g" returns an error, even though it has a perfectly reasonable expectation. The vfunc package offers this functionality. Other similar features are provided, which lead to compact and readable idiom. A wide class of coding bugs is eliminated.
Paper Structure (5 sections, 2 equations, 1 figure)

This paper contains 5 sections, 2 equations, 1 figure.

Figures (1)

  • Figure :