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
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
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
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
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
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
6 matches
Mail list logo