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
Another approach is to use the reshape package
--Assuming your data.frame is called xx
--
libarary(reshape)
mm <- melt(xx, id=c("Size")) ; mm
cast(mm, Size ~variable, median)
--
--- On Tue, 7/14/09, Timo Schneider wrot
Timo Schneider wrote:
>
>
> I have a dataframe (obtained from read.table()) which looks like
>
> ExpA ExpB ExpC Size
> 1 12 2333 1
> 2 12 2429 1
> 3 10 2234 1
> 4 25 5060 2
> 5 24 5362 2
> 6
Try ?aggregate
--- On Wed, 15/7/09, Timo Schneider wrote:
> From: Timo Schneider
> Subject: [R] Grouping data in dataframe
> To: "r-help@r-project.org"
> Received: Wednesday, 15 July, 2009, 1:56 PM
> Hello,
>
> I have a dataframe (obtained from read.table()) which looks
> like
>
>
> Ex
Tena koe Timo
?aggregate
HTH ...
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Timo Schneider
> Sent: Wednesday, 15 July 2009 3:56 p.m.
> To: r-help@r-project.org
> Subject: [R] Grouping data in dataframe
>
5 matches
Mail list logo