[R] quantiles for dates

Gabor Grothendieck ggrothendieck at gmail.com
Wed May 14 17:47:24 CEST 2008


Try this:

> dd <- Sys.Date() + 1:10
> as.Date(quantile(as.numeric(dd)), origin = "1970-01-01")
          0%          25%          50%          75%         100%
"2008-05-15" "2008-05-17" "2008-05-19" "2008-05-21" "2008-05-24"


On Wed, May 14, 2008 at 11:21 AM, GOUACHE David
<D.GOUACHE at arvalisinstitutduvegetal.fr> wrote:
> Hello all,
>
> I was wondering if there is a package in which someone would have created a quantile function that handles vectors of class "Date".
>
> In advance thanks.
>
> David Gouache
> ARVALIS - Institut du végétal
> Station de La Minière
> 78280 Guyancourt
> Tel: 01.30.12.96.22 / Port: 06.86.08.94.32
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list