Re: [R] r code to generate interaction columns

2010-03-10 Thread Sharma, Dhruv
Thanks Martin for the lead. A new avenue to explore. Dhruv -Original Message- From: Martin Maechler [mailto:maech...@stat.math.ethz.ch] Sent: Wednesday, March 10, 2010 6:18 AM To: kMan Cc: Sharma, Dhruv; r-help@r-project.org Subject: Re: [R] r code to generate interaction columns

Re: [R] r code to generate interaction columns

2010-03-10 Thread Martin Maechler
ere which you can run in R by examples(model.matrix) Regards, Martin Maechler, ETH Zurich k> -Original Message- k> From: Sharma, Dhruv [mailto:dhruv.sha...@penfed.org] k> Sent: Monday, March 08, 2010 7:51 AM k> To: kMan; r-help@r-project.org k> Subje

Re: [R] r code to generate interaction columns

2010-03-09 Thread kMan
Dhruv; r-help@r-project.org Subject: RE: [R] r code to generate interaction columns Dear Dhruv, You could create interaction variables manually (assuming A is your dependent variable). Just multiply the variables together. cd.int<-C*D ce.int<-C*E cde.int<-C*D*E # what about D*E, or inter

Re: [R] r code to generate interaction columns

2010-03-08 Thread Sharma, Dhruv
-project.org Subject: RE: [R] r code to generate interaction columns Dear Dhruv, You could create interaction variables manually (assuming A is your dependent variable). Just multiply the variables together. cd.int<-C*D ce.int<-C*E cde.int<-C*D*E # what about D*E, or interactions with B? Incl

Re: [R] r code to generate interaction columns

2010-03-07 Thread kMan
From: Sharma, Dhruv [mailto:dhruv.sha...@penfed.org] Sent: Saturday, March 06, 2010 10:30 AM To: r-help@r-project.org Subject: [R] r code to generate interaction columns Hi, is there a way to take a dataset and extract numeric columns and create interaction columns from it automatically? For e.g. the

[R] r code to generate interaction columns

2010-03-06 Thread Sharma, Dhruv
Hi, is there a way to take a dataset and extract numeric columns and create interaction columns from it automatically? For e.g. there are 5 columns of data: A,B,C,D,E. CDE are numeric. Can someone provide code to automatically create more columns such as: 1) C*D, C*E, C*D*E, (C

[R] r code to generate interaction columns

2010-03-06 Thread Sharma, Dhruv
Hi, is there a way to take a dataset and extract numeric columns and create interaction columns from it automatically? For e.g. there are 5 columns of data: A,B,C,D,E. CDE are numeric. Can someone provide code to automatically create more columns such as: 1) C*D, C*E, C*D*E, (C