[R] Combining columns of different length

Federico Gherardini f.gherardini at pigrecodata.net
Wed Oct 27 02:15:14 CEST 2004


Thanks everybody for their help but in this particular case I've found a 
very easy solution. Since the matrix is preallocated I don't really have 
to add a new column: given a matrix of NAs  I can simply

m[,index][1:length(vec)] <- vec

Thanks again for your suggestions, they will be useful when I need to 
add a column  to a data frame! ;)

Cheers,

Federico




More information about the R-help mailing list