Re: [R] How to use tapply for quantile

2010-04-09 Thread Patrick Hausmann
Hi James, I don't know how to solve it with tapply (something with split I think..), but you could use plyr (from Hadley Wickham). library(plyr) # Generate some data set.seed(321) myD - data.frame( Place = sample(c(AWQ,DFR, WEQ), 10, replace=T), Light = sample(LETTERS[1:2], 15,

Re: [R] How to use tapply for quantile

2010-04-09 Thread Charles C. Berry
On Thu, 8 Apr 2010, James Rome wrote: I am trying to calculate quantiles of a data frame column split up by two factors: # Calculate the quantiles quarts = tapply(gdf$tt, list(gdf$Runway, gdf$OnHour), FUN=quantile, na.rm = TRUE) This does not work: It seems like it did work. It returned a

[R] How to use tapply for quantile

2010-04-08 Thread James Rome
I am trying to calculate quantiles of a data frame column split up by two factors: # Calculate the quantiles quarts = tapply(gdf$tt, list(gdf$Runway, gdf$OnHour), FUN=quantile, na.rm = TRUE) This does not work: quarts 04L 04R 15R 22L 22R 2732 33L