urfunction: urfunctions - univariate real valued functions

Description Usage Arguments Details Examples

View source: R/urfunction.R

Description

Coercing to, and checking "urfunction"s

is.urfunction returns TRUE if x is an object of class urfunction

Usage

1
2
3

Arguments

fun

a function that is to be turned into an urfunction

...

additional parameters to be stored in attribute "options", in particular options for plotting. Can be given as simplists.

x

an R object to be checked.

Details

urfunction adds additional information (plot options) and the class "urfunction" to a function foo. It is assumed that the function foo takes only one real valued argument, and returns a real value. To ensure this is left to the user, since it cannot be checked for primitives.

"urfunction" objects have an attribute "options" which is a simplist of options used for plotting, in particular axis labels and the title (main). It contains an additional element legendtxt which is used when the function is plotted as part of a funsample. This element, as well as all other elements of "options", can be set as argument (...). It defaults to ylab.

Examples

1
2
str(urfunction(sin))
str(urfunction(sin, legendtxt = "sinus", col = 2))

fdnonpar documentation built on May 2, 2019, 5:54 p.m.