as.vector(rbind(x,z)) or c(rbind(x,y)) saves you one step. Don't know if there's a better solution.
HTH, Jerome On August 20, 2003 02:16 pm, Murray Jorgensen wrote: > I want to interlace two vectors. This I can do: > > x <- 1:4 > > z <- x+0.5 > > as.vector(t(cbind(x,z))) > > [1] 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 > > but this seems rather inelegant. Any suggestions? > > Murray ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help