Hi, Doug, maybe
HH <- c(0.88, 0.72, 0.89, 0.93, 1.23, 0.86, 0.98, 0.85, 1.23) TT <- c(7.14, 7.14, 7.49, 8.14, 7.14, 7.32, 7.14, 7.14, 7.14) columnnumbers <- c(0, 0, 0, 3, 0, 0, 0, 2, 0) TMP <- lapply( seq( columnnumbers), function( i, CN, M) { if( CN[i] == 0) as.matrix( M[, i]) else matrix( -1, nrow( M), CN[i]) }, CN = columnnumbers, M = rbind( HH, TT)) do.call( cbind, TMP) gets close to what you want (after some adaptation, of course). HTH -- Gerrit --------------------------------------------------------------------- AOR Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eich...@math.uni-giessen.de Justus-Liebig-University Giessen Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany Fax: +49-(0)641-99-32109 http://www.uni-giessen.de/cms/eichner ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.