Description Usage Arguments Details Examples
Coercing to, and checking "urfunction"
s
is.urfunction
returns TRUE
if x
is an object
of class urfunction
1 2 3 | urfunction(fun, ...)
is.urfunction(x)
|
fun |
a function that is to be turned into an |
... |
additional parameters to be stored in attribute |
x |
an |
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
.
1 2 | str(urfunction(sin))
str(urfunction(sin, legendtxt = "sinus", col = 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.