# HG changeset patch # User guerler # Date 1403005960 14400 # Node ID 5164a18d0916941c0b9083bace3eb588ee370cd9 # Parent 96897d619aaf6c544c39f5e2ae87a485e05494c1 Uploaded diff -r 96897d619aaf -r 5164a18d0916 charts.r --- a/charts.r Mon Jun 16 10:58:10 2014 -0400 +++ b/charts.r Tue Jun 17 07:52:40 2014 -0400 @@ -94,8 +94,15 @@ writeLines(header_columns, output) writeLines('#', output) + # pad columns + rows <- max(unlist(lapply(l, length))) + padded <- lapply(l, function(col) { + length(col) = rows; + col + }) + # write table - write.table(l, file=output, row.names=FALSE, col.names = FALSE, quote=FALSE, sep='\t') + write.table(padded, file=output, row.names=FALSE, col.names = FALSE, quote=FALSE, sep='\t') # close file close(output)