Description Usage Arguments Details Value Author(s) Examples
Subsetting, concatenation and printing of funsample
.
object
1 2 3 4 5 6 7 8 |
... |
for method |
recursive |
ignored, for compatibility with generic function |
x |
|
name |
character string or name (possibly backtick quoted) of a function
contained |
value |
replacement value, needs to be a |
Method "c"
concatenates the function lists (funsample
objects)
or functions contained in its arguments. The first argument is always a funsample
object, otherwise this method would not have been called. Any functions contained
in the further arguments are appended to the function list of the first argument.
The attribute "arglim"
of the result is obtained
as intersection of the arglim
s in the arguments. If this intersection is empty,
the method returns NULL
and issues a warning. The options
attribute
which contains plot options (in particular axis labels) is coerced from the
options attributes of the ...
arguments. Should there be several
options with the same name, priority is on the options of the first
funsample
in ...
.
If ...
contains objects that are neither funsample
s nor function
s,
an ordinary list
object is returned.
Assigning NULL
to a function element of in a funsample x
is equivalent to removing that element from the function sample.
An urfunction
, or NULL
.
For x$name <- value
a funsample
object.
Ute Hahn ute@imf.au.dk
1 2 3 4 5 6 7 8 9 | myfuns <- funsample(list(sin = sin, cos = cos), arglim = c(0, 2*pi))
myfuns2 <- funsample(list(exp = exp, log = log), arglim = c(0, 2*pi))
myfuns <- c(myfuns, tan = tan, myfuns2, f = function(x) x^2)
myfuns(c(0, pi/4, pi/2))
myfuns$f(3)
myfuns$f <- function(x) x - 1
myfuns$g <- function(x) x^2 + 1
myfuns$log <- NULL
myfuns(c(0, pi/4, pi/2, 3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.