Re: [R] creation of new variables

2006-09-26 Thread Mike Nielsen
You may not have told us quite enough to be able to help you.  It may
be worth your while investing some time in describing the problem you
are trying to solve a little bit more comprehensively.

The posting guide http://www.R-project.org/posting-guide.html can be
useful in helping you  frame a question that stands a better chance of
receiving help.

Regards,

Mike

On 9/26/06, nalluri pratap [EMAIL PROTECTED] wrote:
 Hello All,

   I have 8 variables named

a b c d e f g h

   I need to create four variables from these 8 vraibles in R.

   the new variables are ab,cd,ef,gh.

   Can anyone pleas help me

   thanks,
   Pratap




 -


 [[alternative HTML version deleted]]

 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.



-- 
Regards,

Mike Nielsen

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] creation of new variables

2006-09-26 Thread Ritwik Sinha
Depends on what these variables are. Are these vectors?
if so a simple
a*b etc should work.
If they are columns of a data frame DF?
then DF$a*DF$b.

If these variables are part of a function then also a*b should work.

On 9/26/06, nalluri pratap [EMAIL PROTECTED] wrote:

 Hello All,

   I have 8 variables named

a b c d e f g h

   I need to create four variables from these 8 vraibles in R.

   the new variables are ab,cd,ef,gh.

   Can anyone pleas help me

   thanks,
   Pratap




 -


 [[alternative HTML version deleted]]

 __
 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/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 
Ritwik Sinha
Graduate Student
Epidemiology and Biostatistics
Case Western Reserve University

http://darwin.cwru.edu/~rsinha

[[alternative HTML version deleted]]

__
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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.