1 2 3 4 5 6 7 8 9 10 11 12
files = commandArgs(trailingOnly=TRUE); if (length(files) < 2) { quit(); } png(files[1]); par(mfcol=(2, ceiling((length(files)-1)/2))); for (f in files[2:length(files)) { x = read.table(f, sep="\t")[[2]]; hist(x); }