[R] Concatenating two vectors into one

Uwe Ligges ligges at statistik.tu-dortmund.de
Mon May 18 13:27:30 CEST 2009



Henning Wildhagen wrote:
> Dear users, 
> 
> a very simple question: 
> 
> Given two vectors x and y
> 
> x<-as.character(c("A","B","C","D","E","F"))
> y<-as.factor(c("1","2","3","4","5","6"))
> 
> i want to combine them into a single vector z as A1, B2, C3 and so on.
> 
> z<-x*y is not working, i tried several others function, but did not get to 
> the solution.


Homework? Anyway, see ?paste.

Uwe Ligges


> Thanks for your help,
> 
> Henning
> 
>




More information about the R-help mailing list