fapply | R Documentation |
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.
fapply(data, FUN, row.names, ...)
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 |
This function has to be used only with fdata
objects, unless it
stop, returning no value.
The returned value is a fdata
object too.
J. Damon
apply
, lapply
.
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.