When I put in mode=mode(COUNTS) I get the value numeric as an answer. I
think it's giving me the data type not the mode.
--
View this message in context:
http://r.789695.n4.nabble.com/Can-package-plyr-also-calculate-the-mode-tp4663235p4663301.html
Sent from the R help mailing list archive at
When I run yy - ddply(all,ACTIVIT, summarise, mode=mode(COUNTS))
I get : ACTIVITmode
XX numeric
ZZ numeric
so on.
--
View this message in context:
I am trying to replicate the SAS proc univariate in R. I got most of the
stats I needed for a by grouping in a data frame using:
all1 - ddply(all,ACT_NAME, summarise, mean=mean(COUNTS), sd=sd(COUNTS),
q25=quantile(COUNTS,.25),median=quantile(COUNTS,.50),
q75=quantile(COUNTS,.75),
Sure, you can add the mode in, following the format by the other
summary statistics.
?mode
Sarah
On Wed, Apr 3, 2013 at 5:25 PM, ramoss ramine.mossad...@finra.org wrote:
I am trying to replicate the SAS proc univariate in R. I got most of the
stats I needed for a by grouping in a data frame
...@gmail.com]
Sent: Wednesday, April 03, 2013 5:32 PM
To: Mossadegh, Ramine N.
Cc: r-help
Subject: Re: [R] Can package plyr also calculate the mode?
Sure, you can add the mode in, following the format by the other summary
statistics.
?mode
Sarah
On Wed, Apr 3, 2013 at 5:25 PM, ramoss
it cannot be calculated within plyer?
-Original Message-
From: Sarah Goslee [mailto:sarah.gos...@gmail.com]
Sent: Wednesday, April 03, 2013 5:36 PM
To: Mossadegh, Ramine N.; r-help
Subject: Re: [R] Can package plyr also calculate the mode?
If you type
?mode
at an R prompt you
:
So you mean it cannot be calculated within plyer?
-Original Message-
From: Sarah Goslee [mailto:sarah.gos...@gmail.com]
Sent: Wednesday, April 03, 2013 5:36 PM
To: Mossadegh, Ramine N.; r-help
Subject: Re: [R] Can package plyr also calculate the mode?
If you type
?mode
at an R prompt you
On 04/04/2013 09:56 AM, Peter Ehlers wrote:
On 2013-04-03 14:59, Sarah Goslee wrote:
Of course it can. Use the mode() in the same way you used the mean()
function.
You didn't provide a reproducible example, so I can't provided tested
code, but I would think that you can add
mode=mode(COUNTS)
...@gmail.com]
Sent: Wednesday, April 03, 2013 5:36 PM
To: Mossadegh, Ramine N.; r-help
Subject: Re: [R] Can package plyr also calculate the mode?
If you type
?mode
at an R prompt you will be able to read the help for the mode() function.
On Wed, Apr 3, 2013 at 5:34 PM, Mossadegh, Ramine N
9 matches
Mail list logo