Murray Jorgensen <[EMAIL PROTECTED]> writes: > 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?
Well, there's as.vector(rbind(x,z)) at least... I don't think things get more elegant than that. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
