Re: [R] creation of new variables

From: Ritwik Sinha <ritwik.sinha_at_gmail.com>
Date: Tue 26 Sep 2006 - 19:42:17 GMT

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 <pratap_stat@yahoo.co.in> 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.
Received on Wed Sep 27 05:56:14 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 26 Sep 2006 - 20:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.