Skip to content
Prev 167027 / 398502 Next

Casting lists to data.frames, analog to SAS

On Jan 14, 2009, at 4:14 PM, David Winsemius wrote:

            
A more self-documenting call might be:

 > as.data.frame.table(with(warpbreaks, by(breaks, list(Wool=wool,  
Tension=tension), sum)), responseName="Sum" )
   Wool Tension Sum
1    A       L 401
2    B       L 254
3    A       M 216
4    B       M 259
5    A       H 221
6    B       H 169