On Wed, 14 May 2008, GOUACHE David 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".

What is the median of today and tomorrow, expressed as a day?

Quantiles of discrete distributions are not unambiguously defined. If you have an answer to that, quantile(type=1) may help you, e.g.

as.Date(quantile(as.vector(x), type=1), origin="1970-01-01")
          0%          25%          50%          75%         100%
"1972-07-01" "1977-01-01" "1983-07-01" "1993-07-01" "2006-01-01"


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

--
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
______________________________________________
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