Re: [R] data.frame - how to calculate the number of rows

2007-12-27 Thread Agrarimmobilien
ursday, December 27, 2007 11:16 AM Subject: Re: [R] data.frame - how to calculate the number of rows Try this: summaryBy(B+C~ A+D, data=daten,FUN=c(mean, var, length)) On 26/12/2007, Agrarimmobilien <[EMAIL PROTECTED]> wrote: > this works now, > > cbind(summaryBy(B+C~ A, data

Re: [R] data.frame - how to calculate the number of rows

2007-12-27 Thread Henrique Dallazuanna
Try this: summaryBy(B+C~ A+D, data=daten,FUN=c(mean, var, length)) On 26/12/2007, Agrarimmobilien <[EMAIL PROTECTED]> wrote: > this works now, > > cbind(summaryBy(B+C~ A, data=df, FUN=c(mean, var)), > 'numrows'=as.numeric(table(df$A))) > > > but now, I cannot add another column D beside A, as I

Re: [R] data.frame - how to calculate the number of rows

2007-12-26 Thread Agrarimmobilien
this works now, cbind(summaryBy(B+C~ A, data=df, FUN=c(mean, var)), 'numrows'=as.numeric(table(df$A))) but now, I cannot add another column D beside A, as I do before, like cbind(summaryBy(B+C~ A+D, data=df,FUN=c(mean, var)), 'numrows'=as.numeric(table(df$A))) because of this D, I got the

Re: [R] data.frame - how to calculate the number of rows

2007-12-26 Thread Henrique Dallazuanna
If i understand your question, you can try this: cbind(summaryBy(B+C~ A, data=df,FUN=c(mean, var)), 'num rows'=as.numeric(table(df$A))) On 26/12/2007, Agrarimmobilien <[EMAIL PROTECTED]> wrote: > Hello, > > I had to give some more information to my posting: > > as ouput there are more than one r

Re: [R] data.frame - how to calculate the number of rows

2007-12-26 Thread Agrarimmobilien
Hello, I had to give some more information to my posting: as ouput there are more than one row, depending on the values of column A (transformierung to distinct values, here 3 and 4, but there are much more) >ABC > 1 3 6 5 > 2

[R] data.frame - how to calculate the number of rows

2007-12-26 Thread Pfeiffer & Koberstein Immobilien GmbH - Ralf Pfeiffer
Hello, it seems to be a simple problem, but I couldn't find an answer in the archiv. (I think, it must has something to do with the group-select, like in php) I've the following data.frame: ABC 1 3 6 5 2 4 4