[R] stacking vectors of unequal length

Jonathan Baron baron at cattell.psych.upenn.edu
Wed Apr 24 01:42:26 CEST 2002


On 04/23/02 18:05, Daniel A. Powers wrote:

>I would like to make a single vector out of something like the following:
>
>y0 <- rep(0,100)
>
>y1 <- rep(1,20)
>
>and stack them one on top of the other to a vector y with length 120.

c(y0,y1)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list