Re: [R] aggregation with two statistical functions - mean and variance

From: Pfeiffer & Koberstein Immobilien GmbH - Ralf Pfeiffer <ralf.pfeiffer_at_pfeiffer-koberstein-immobilien.de>
Date: Tue, 25 Dec 2007 10:41:56 +0100

thank you, I downloaded and installed the package. With library(help="doBy") I got the information about this package.

But when I use the syntax

summaryBy(daten[,c(3:4)], list(A,B), Fun=c(var,mean))

I got the following error:
<<Fehler: konnte Funktion "summaryBy" nicht finden>> (error: couldn't find function summaryBy)

I tried before
require(doBy), but this doesn't work neither.

What can I do?

> See summaryBy in the doBy package.
>
> On Dec 24, 2007 4:27 PM, Agrarimmobilien
> <ralf.pfeiffer_at_agrarimmobilien.info> wrote:
>> Hello,
>>
>> using the syntax
>>
>> aggregate(daten[,c(3,4)], list(A,B), mean)
>>
>> I'm getting the following data.frame:
>>
>>
>> A B C D
>> 1 35 1 6.16000 5
>> 2 47 1 31.24333 20
>> 3 54 1 26.81773 2
>> 4 3 2 12.99000 7
>> 5 4 2 6.49000 1
>>
>> C and D are both means. But now I want to have: C is mean, D is variance.
>>
>> How can I do this by using/ changing the aggregation syntax?
>>
>> Thanks!
>>
>> Macki
>>
>> ______________________________________________
>> R-help_at_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.
>>
>



R-help_at_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. Received on Tue 25 Dec 2007 - 09:44:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 25 Dec 2007 - 15:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.