[R] Row median of Date class variables in a data frame

2005-02-23 Thread Stephen D. Weigand
I am trying to calculate the median of each row of a data frame where the data frame consist of columns of class Date. Below are my test data and best attempt at using apply. I didn't see a solution via Google or the Baron search site. I'd be grateful for any suggestions or solutions. I'm using R

Re: [R] Row median of Date class variables in a data frame

2005-02-23 Thread Gabor Grothendieck
Stephen D. Weigand weigand.stephen at charter.net writes: : : I am trying to calculate the median of each row of a : data frame where the data frame consist of : columns of class Date. : : Below are my test data and best attempt at using apply. : I didn't see a solution via Google or the Baron

Re: [R] Row median of Date class variables in a data frame

2005-02-23 Thread Prof Brian Ripley
Note that the argument to apply() is a matrix, not a data frame, so your object has been coerced to a matrix. That is spelled out on the help page for apply(), as it is frequent misuse. You would be better off using a matrix of class Date in the first place if you want row operations. On Wed,