check the following:

x <- c(1,3,5)
y <- c(2,4,6)

c(t(cbind(x, y)))
c(matrix(c(x, y), 2, by = TRUE))


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
    http://perswww.kuleuven.be/dimitris_rizopoulos/


----- Original Message ----- From: "Shubha Vishwanath Karanth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 23, 2008 2:54 PM
Subject: [R] Simple... but...


Hi R,



If

x=c(1,3,5)

y=c(2,4,6)



I need a vector which is c(1,2,3,4,5,6) from x and y.



How do I do it? I mean the best way....



Thanks, Shubha



This e-mail may contain confidential and/or privileged i...{{dropped:13}}

______________________________________________
R-help@r-project.org 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.



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

______________________________________________
R-help@r-project.org 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.

Reply via email to