[R] Combining the values of two variables into one

Marc Schwartz marc_schwartz at me.com
Fri Oct 22 23:14:44 CEST 2010


On Oct 22, 2010, at 4:00 PM, David Herzberg wrote:

> I start with:
> 
> v1<-c(1,3,5,7)
> v2<-c(2,4,6,8)
> 
> And I want to end up with:
> 
> v3<-c(12,34,56,78)
> 
> How do I get there?
> 
> Thanks,


> v1*10 + v2
[1] 12 34 56 78


HTH,

Marc Schwartz



More information about the R-help mailing list