Re: [R] how to convert multiple dummy variables to 1 factor variable?

2006-10-22 Thread Marc Schwartz
On Sun, 2006-10-22 at 14:03 -0500, Marc Schwartz wrote: > On Sun, 2006-10-22 at 14:37 -0400, Wensui Liu wrote: > > Thank you so much, Marc and Peter, > > > > Your method works great if I want to convert N dummies into N-level > > factor. But what if I want to convert N dummies into (N+1)-level > >

Re: [R] how to convert multiple dummy variables to 1 factor variable?

2006-10-22 Thread Wensui Liu
Thank you so much, Marc and Peter, Your method works great if I want to convert N dummies into N-level factor. But what if I want to convert N dummies into (N+1)-level factor? I tried both ways but none works. Again, thank you so much! On 10/22/06, Marc Schwartz <[EMAIL PROTECTED]> wrote: > On

Re: [R] how to convert multiple dummy variables to 1 factor variable?

2006-10-22 Thread Wensui Liu
Great! It seems everyone is having fun with R in the weekend afternoon. Thank you so much, Marc and Peter. On 10/22/06, Marc Schwartz <[EMAIL PROTECTED]> wrote: > On Sun, 2006-10-22 at 14:03 -0500, Marc Schwartz wrote: > > On Sun, 2006-10-22 at 14:37 -0400, Wensui Liu wrote: > > > Thank you so

Re: [R] how to convert multiple dummy variables to 1 factor variable?

2006-10-22 Thread Peter Dalgaard
"Wensui Liu" <[EMAIL PROTECTED]> writes: > Thank you so much, Marc and Peter, > > Your method works great if I want to convert N dummies into N-level > factor. But what if I want to convert N dummies into (N+1)-level > factor? I tried both ways but none works. Mine should work, except for the

Re: [R] how to convert multiple dummy variables to 1 factor variable?

2006-10-22 Thread Marc Schwartz
On Sun, 2006-10-22 at 14:37 -0400, Wensui Liu wrote: > Thank you so much, Marc and Peter, > > Your method works great if I want to convert N dummies into N-level > factor. But what if I want to convert N dummies into (N+1)-level > factor? I tried both ways but none works. > > Again, thank you so

Re: [R] how to convert multiple dummy variables to 1 factor variable?

2006-10-22 Thread Marc Schwartz
On Sun, 2006-10-22 at 09:35 +0200, Peter Dalgaard wrote: > Marc Schwartz <[EMAIL PROTECTED]> writes: > > > On Sat, 2006-10-21 at 21:04 -0400, Wensui Liu wrote: > > > Dear Listers, > > > > > > I am wondering how to convert multiple dummy variables to 1 factor > > > variable. > > > > > > Thanks.

Re: [R] how to convert multiple dummy variables to 1 factor variable?

2006-10-22 Thread Peter Dalgaard
Marc Schwartz <[EMAIL PROTECTED]> writes: > On Sat, 2006-10-21 at 21:04 -0400, Wensui Liu wrote: > > Dear Listers, > > > > I am wondering how to convert multiple dummy variables to 1 factor variable. > > > > Thanks. > > > > wensui > > I was thinking of a function that is essentially the revers

Re: [R] how to convert multiple dummy variables to 1 factor variable?

2006-10-21 Thread Marc Schwartz
On Sat, 2006-10-21 at 21:04 -0400, Wensui Liu wrote: > Dear Listers, > > I am wondering how to convert multiple dummy variables to 1 factor variable. > > Thanks. > > wensui I was thinking of a function that is essentially the reverse of model.matrix() which is used by R modeling functions. I di

[R] how to convert multiple dummy variables to 1 factor variable?

2006-10-21 Thread Wensui Liu
Dear Listers, I am wondering how to convert multiple dummy variables to 1 factor variable. Thanks. wensui __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/p