Mercurial > repos > guerler > charts
comparison charts.r @ 59:5164a18d0916 draft
Uploaded
author | guerler |
---|---|
date | Tue, 17 Jun 2014 07:52:40 -0400 |
parents | f294f5c9608c |
children | 8aa930289c8b |
comparison
equal
deleted
inserted
replaced
58:96897d619aaf | 59:5164a18d0916 |
---|---|
92 writeLines(header_module, output) | 92 writeLines(header_module, output) |
93 writeLines(header_settings, output) | 93 writeLines(header_settings, output) |
94 writeLines(header_columns, output) | 94 writeLines(header_columns, output) |
95 writeLines('#', output) | 95 writeLines('#', output) |
96 | 96 |
97 # pad columns | |
98 rows <- max(unlist(lapply(l, length))) | |
99 padded <- lapply(l, function(col) { | |
100 length(col) = rows; | |
101 col | |
102 }) | |
103 | |
97 # write table | 104 # write table |
98 write.table(l, file=output, row.names=FALSE, col.names = FALSE, quote=FALSE, sep='\t') | 105 write.table(padded, file=output, row.names=FALSE, col.names = FALSE, quote=FALSE, sep='\t') |
99 | 106 |
100 # close file | 107 # close file |
101 close(output) | 108 close(output) |
102 } else { | 109 } else { |
103 # print details | 110 # print details |