[R] Concatenating two vectors into one
macrakis at alum.mit.edu
Mon May 18 14:54:02 CEST 2009
If you want to concatenate the *vectors*, you need 'c', which will
also coerce the elements to a common type.
If you want to concatenate the corresponding *elements* of the
vectors, you need 'paste', which will coerce them to character
On 5/18/09, Henning Wildhagen <HWildhagen at gmx.de> wrote:
> Dear users,
> a very simple question:
> Given two vectors x and y
> 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.
> Thanks for your help,
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help