Skip to content
Prev 79739 / 398502 Next

data.frame-question]

Hi

quite near

using aggregate it is possible to reach what you want

TAB3 <- with(TAB1, aggregate(Number, 
list("Name_singular"=Name), sum, na.rm=TRUE))

see
`data.frame':   3 obs. of  2 variables:
 $ Name_singular: Factor w/ 3 levels "A","B","C": 1 2 3
 $ x            : num  3 5 0
HTH
Petr
On 27 Oct 2005 at 8:47, Brandt, T. (Tobias) wrote:
From:           	"Brandt, T. (Tobias)" <TobiasBr at taquanta.com>
To:             	"'Michael Graber'" <michael_graber at gmx.de>,
	"'r-help at stat.math.ethz.ch'" <r-help at stat.math.ethz.ch>
Date sent:      	Thu, 27 Oct 2005 08:47:45 +0200
Subject:        	Re: [R] data.frame-question]
Petr Pikal
petr.pikal at precheza.cz