fapply {far} | R Documentation |
Apply functions over a fdata object
Description
fapply
returns a fdata
object of the same length as
data. Each element of which is the result of applying FUN
to
the corresponding element of data.
Usage
fapply(data, FUN, row.names, ...)
Arguments
data |
A |
FUN |
the function to be applied. In the case of functions like +, %*%, etc., the function name must be quoted. |
row.names |
a vector giving the names describing the results of
|
... |
optional arguments to |
Details
This function has to be used only with fdata
objects, unless it
stop, returning no value.
Value
The returned value is a fdata
object too.
Author(s)
J. Damon
See Also
Examples
# Simulation of a FARX process
data1 <- simul.farx(m=10,n=400,base=base.simul.far(20,5),
base.exo=base.simul.far(20,5),
d.a=matrix(c(0.5,0),nrow=1,ncol=2),
alpha.conj=matrix(c(0.2,0),nrow=1,ncol=2),
d.rho=diag(c(0.45,0.90,0.34,0.45)),
alpha=diag(c(0.5,0.23,0.018)),
d.rho.exo=diag(c(0.45,0.90,0.34,0.45)),
cst1=0.0)
fapply(data1,sum)
multplot(fapply(fapply(data1,abs),cumsum))
[Package far version 0.6-6 Index]