search for: medianmonths

Displaying 2 results from an estimated 2 matches for "medianmonths".

2011 Jun 29
1
median time period
Hello List I'm trying to calculate the median period (in months) of a set of time intervals (between two interventions). I have been playing with the lubridate package to create the intervals but I can't think of the right approach to get the median timeperiod. Toy code: library(lubridate) test <- c('08-04-22', '08-07-28', '09-03-02', '09-03-03',
2011 Jun 30
0
help with interpreting what nnet() output gives:
...ain; charset=iso-8859-1 Typical - you post to the list and then work it out for yourself! Anyway here's my solution Toy code as before then: intervalsMonths <- 12 * intervals$year + intervals$month #convert whole years to months then add the remaining months for that entry in intervals medianMonths <- median(as.numeric(intervalsMonths)) Best iain --- On Wed, 29/6/11, Iain Gallagher <iaingallagher at btopenworld.com> wrote: > From: Iain Gallagher <iaingallagher at btopenworld.com> > Subject: [R] median time period > To: r-help at r-project.org > Date: Wednesday,...