Am Mittwoch, den 15.07.2009, 00:42 -0500 schrieb markle...@verizon.net:

Hi!

> Hi: I think aggregate does what you want. you had 34 in one of your
> columns but I think you meant it to be 33.
> 
> DF <- read.table(textConnection("ExpA ExpB ExpC Size
> 1 12 23 33 1
> 2 12 24 29 1
> 3 10 22 34 1
> 4 25 50 60 2
> 5 24 53 62 2
> 6 21 49 61 2"),header=TRUE)
> 
> print(DF)
> print(str(DF))
> 
> aggregate(DF,list(DF$Size),median)

Yes, thanks to you and all the other people who helped! The aggregate
function is exactly what I was looking for. Thanks for the help!

Regards,
Timo

______________________________________________
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