How can I apply a summary function to a time of day subset?
For example with:
r['T16:00/T17:00']$Value
How can I apply something like function (x) quantile(x, c(.90)) for Value over each day’s sample hour?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
apply.dailyto apply a function to each day’s data after you’ve done the time-of-day subset.You can see I needed to do a few backflips to ensure the object returned from your function can be handled by
apply.daily. Mainly, it has to be a multi-column xts object with one row.