Re: [R] by() and CrossTable()

2006-04-25 Thread Marc Schwartz (via MN)
That does appear to work. Thanks for the workaround Gabor. I'll still be working on the other changes of course to make this more "natural". Regards, Marc On Tue, 2006-04-25 at 12:34 -0400, Gabor Grothendieck wrote: > At least for this case I think you could get the effect without modifyiing >

Re: [R] by() and CrossTable()

2006-04-25 Thread Gabor Grothendieck
At least for this case I think you could get the effect without modifyiing CrossTable like this: as.CrossTable <- function(x) structure(x, class = c("CrossTable", class(x))) print.CrossTable <- function(x) for(L in x) cat(L, "\n") by(warpbreaks, warpbreaks$tension, function(x) as.CrossTab

Re: [R] by() and CrossTable()

2006-04-25 Thread Marc Schwartz (via MN)
On Tue, 2006-04-25 at 11:07 -0400, Chuck Cleland wrote: >I am attempting to produce crosstabulations between two variables for > subgroups defined by a third factor variable. I'm using by() and > CrossTable() in package gmodels. I get the printing of the tables first > and then a printing

[R] by() and CrossTable()

2006-04-25 Thread Chuck Cleland
I am attempting to produce crosstabulations between two variables for subgroups defined by a third factor variable. I'm using by() and CrossTable() in package gmodels. I get the printing of the tables first and then a printing of each level of the INDICES. For example: library(gmodels) b