, October 22, 2012 5:26 PM
Subject: Re: [R] Counting duplicates in a dataframe
On Oct 22, 2012, at 7:48 AM, arun wrote:
> HI,
> Another way:
> dat1<-read.table(text="
> Observation Gender Dosage Alertness
> 1 1 m a 8
> 2 2
Thank you all; David -- this is, in fact, exactly what I need!
Asaf
--
View this message in context:
http://r.789695.n4.nabble.com/Counting-duplicates-in-a-dataframe-tp4646954p4647075.html
Sent from the R help mailing list archive at Nabble.com.
__
sAsFactors=FALSE)
>
>
> tapply(dat1$Observation,list(dat1$Gender,dat1$Dosage),length)
> # a b
> #f 4 4
> #m 4 4
How is that different than:
table(dat1$Gender, dat1$Dosage)
--
David.
> A.K.
>
> - Original Message -
> From: asafwe
> To: r-help@r-pr
m: asafwe
To: r-help@r-project.org
Cc:
Sent: Sunday, October 21, 2012 10:02 PM
Subject: [R] Counting duplicates in a dataframe
Hello,
I am looking at a two-way ANOVA dataset, and would like to count the rows in
the dataframe with the same level of the first factor ("Gender") and the
second fac
m: asafwe
To: r-help@r-project.org
Cc:
Sent: Sunday, October 21, 2012 10:02 PM
Subject: [R] Counting duplicates in a dataframe
Hello,
I am looking at a two-way ANOVA dataset, and would like to count the rows in
the dataframe with the same level of the first factor ("Gender") and the
s
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of asafwe
> Sent: Monday, October 22, 2012 4:02 AM
> To: r-help@r-project.org
> Subject: [R] Counting duplicates in a dataframe
>
> Hello,
>
> I
Hello,
I am looking at a two-way ANOVA dataset, and would like to count the rows in
the dataframe with the same level of the first factor ("Gender") and the
second factor ("Dosage"). In other words, I am interested in the number of
observations per each "cell" in a (not necessarily balanced) two-w
7 matches
Mail list logo