Gabor, 
about problem 1. , now I understand.
But in problem 2. , I do as your recommandation. and it still doesn't work.
I wonder is there any detail introduction about the form of the 'FUN' in the
'rollapply'?
Can you help me again?

Thank you very much!

Best regard
Saji


There is no quantile method defined for zoo objects so it falls
through to the default method but that method does not work for zoo
objects.  Try this:

set.seed(123)
rn <- rnorm(500)
quantile(rn, 0.8)
quantile(coredata(zoo(rn)), 0.8)

In the second question the error message tells you what the problem
is.  FUN is supposed to be a function but a vector of numbers has been
supplied rather than a function.  Try:

uprange=rollapply(x,width=10,FUN=function(x)quantile(x,0.8),align='right')



-----
------------------------------------------------------------------
Saji Ren
from Shanghai China
GoldenHeart Investment Group
------------------------------------------------------------------
-- 
View this message in context: 
http://n4.nabble.com/Confusion-in-quantile-and-getting-rolling-estimation-of-sample-quantiles-tp1015893p1016399.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to