| vfunc-package | R Documentation |
If f <- function(x){x^2} and g <- function(x){x+1} it is a
constant source of annoyance to me that “f+g” is not
defined. Package vfunc allows you to do this.
The package defines a single S4 class, vf. This has a
single slot, .Data, of type function which means that
vf objects inherit much of the behaviour of functions, but for
which new methods (such as the Arith group of S4 generics)
may be defined.
Index: This package was not yet installed at build time.
Robin K. S. Hankin [aut, cre] (ORCID: <https://orcid.org/0000-0001-5982-0415>)
Maintainer: Robin K. S. Hankin <hankin.robin@gmail.com>
f <- as.vf(function(x){x^2})
f + Sin
as.function(f*Sin + Exp)(1:4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.