Nominate for a fortune.
John Kane
Kingston ON Canada
> -Original Message-
> From: jdnew...@dcn.davis.ca.us
You seem to be falling prey to a common misconception that "R" is some
monolithic tool, when in fact it is a herd of cats.
___
You seem to be falling prey to a common misconception that "R" is some
monolithic tool, when in fact it is a herd of cats.
The "by" function, from the "base" package, returns a list of results returned
by your function. One approach to making a data frame out of that is to use the
simplify2arra
On Dec 20, 2013, at 9:45 AM, David Winsemius wrote:
>
> On Dec 20, 2013, at 9:38 AM, Onur Uncu wrote:
>
>> I used the by() function on a data.frame to get sums of the data grouped by
>> 2 factors. The function worked however the output is in a class called 'by'.
>> Not familiar with this clas
Hi,
You can also try:
library(reshape2)
dcast(as.data.frame(as.table(by(warpbreaks[,1],warpbreaks[,-1],sum))),wool~tension,
value.var="Freq")
A.K.
On , arun wrote:
Hi,
Try:
as.table(by(warpbreaks[,1],warpbreaks[,-1],sum))
#or to convert to data.frame
as.data.frame(as.table(by(warpbreaks[,1
Hi,
Try:
as.table(by(warpbreaks[,1],warpbreaks[,-1],sum))
#or to convert to data.frame
as.data.frame(as.table(by(warpbreaks[,1],warpbreaks[,-1],mean)))
A.K.
On Friday, December 20, 2013 12:39 PM, Onur Uncu wrote:
I used the by() function on a data.frame to get sums of the data grouped by 2
On Dec 20, 2013, at 9:38 AM, Onur Uncu wrote:
> I used the by() function on a data.frame to get sums of the data grouped by 2
> factors. The function worked however the output is in a class called 'by'.
> Not familiar with this class. How can I turn the output into a nice table
> where columns
I used the by() function on a data.frame to get sums of the data grouped by 2
factors. The function worked however the output is in a class called 'by'. Not
familiar with this class. How can I turn the output into a nice table where
columns represent values of factor1, row represent values of fa
7 matches
Mail list logo