[R] vector

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Dec 27 11:32:37 CET 2004


"BXC (Bendix Carstensen)" <bxc at steno.dk> writes:

> If you have all your vectors in a list
> 
> vl <- list( p1, p2, p3)
> 
> the the following should do the trick:
> 
> res <- numeric(0)
> for( i in 1:length(vl) ) res <- c( res, vl[[i]] ) 

Or,

  do.call("c", vl)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list