Federico Gherardini <f.gherardini <at> pigrecodata.net> writes:

: 
: 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
: 

You could simplify that to:

    m[seq(along=vec), index] <- vec

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to