Re: [R] bug in 'margins' behavior in reshape - cast

2008-07-31 Thread mfrumin
sounds great. there are often times I'd like to use reshape on data frames of hundreds of thousands or millions of rows, but I have found that it is just too slow at this point to be convenient. thanks again for everything, Mike hadley wrote: > > On Thu, Jul 31, 2008 at 4:59 AM, Michael Frum

Re: [R] bug in 'margins' behavior in reshape - cast

2008-07-31 Thread hadley wickham
On Thu, Jul 31, 2008 at 4:59 AM, Michael Frumin <[EMAIL PROTECTED]> wrote: > thanks, that workaround, well, works! > > what are you working on with the rewrite? just efficiency? or major > changes in functionality/interface? I've come up with a strategy that makes reshape _much_ faster - 10-20x

Re: [R] bug in 'margins' behavior in reshape - cast

2008-07-31 Thread Michael Frumin
thanks, that workaround, well, works! what are you working on with the rewrite? just efficiency? or major changes in functionality/interface? thanks, mike On Wed, Jul 30, 2008 at 7:10 PM, hadley wickham <[EMAIL PROTECTED]> wrote: > On Wed, Jul 30, 2008 at 12:41 PM, mfrumin <[EMAIL PROTECTED]>

Re: [R] bug in 'margins' behavior in reshape - cast

2008-07-30 Thread hadley wickham
On Wed, Jul 30, 2008 at 12:41 PM, mfrumin <[EMAIL PROTECTED]> wrote: > > I want the column that is never going to actually have the '(all)' level to > not become of type factor. continuing the example: > > chick_m$diet = as.integer(as.character(chick_m$diet)) > is.factor(chick_m$diet) #returns FAL

Re: [R] bug in 'margins' behavior in reshape - cast

2008-07-30 Thread mfrumin
I want the column that is never going to actually have the '(all)' level to not become of type factor. continuing the example: chick_m$diet = as.integer(as.character(chick_m$diet)) is.factor(chick_m$diet) #returns FALSE is.factor(cast(subset(chick_m, time == 0), diet + chick ~ time, mean, margin

Re: [R] bug in 'margins' behavior in reshape - cast

2008-07-30 Thread hadley wickham
On Wed, Jul 30, 2008 at 11:47 AM, mfrumin <[EMAIL PROTECTED]> wrote: > > according to the documentation of the cast function in the reshape function, > I would expect this bit of code from the examples to calculate marginal > means over only the 'diet' variable. > > #Chick weight example > names(Ch