plotall2d function 5 data missing 0 parnames missing 0 bins numeric 1 20 levels numeric 1 10 { 5 comment.expression 2 comment 1 character 5 # # plotall2d(): Generates contour plots all events contained in #\t\t'data', using all combinations of parameters. Axes are labeled #\t\twith 'parnames' # if 2 call 3 name 1 < call 2 name 1 ncol name 1 data numeric 1 2 { 1 call 2 name 1 stop message character 1 plotall2d() requires at least two parameters. comment.expression 2 if 2 call 3 name 1 != call 2 name 1 ncol name 1 data call 2 name 1 length name 1 parnames { 1 call 2 name 1 stop message character 1 ncol(data) must equal length(parnames). comment 1 character 3 # # Calculate the number of plots to be generated # <- 2 name 1 numplots call 3 name 1 / call 2 name 1 factorial call 2 name 1 ncol name 1 data ( 2 name 1 ( call 3 name 1 * numeric 1 2 call 2 name 1 factorial call 3 name 1 - call 2 name 1 ncol name 1 data numeric 1 2 comment.expression 2 comment.expression 2 call 2 name 1 par mfrow call 3 name 1 c call 2 name 1 ceiling call 3 name 1 / name 1 numplots numeric 1 2 numeric 1 2 comment 1 character 1 # comment 1 character 3 # # Plot 2-D histograms as contours # for 3 i NULL 0 call 3 name 1 : numeric 1 1 ( 2 name 1 ( call 3 name 1 - call 2 name 1 ncol name 1 data numeric 1 1 { 1 for 3 j NULL 0 call 3 name 1 : ( 2 name 1 ( call 3 name 1 + name 1 i numeric 1 1 call 2 name 1 ncol name 1 data { 1 comment.expression 2 comment.expression 2 call 9 name 1 contour call 5 name 1 hist2d call 4 name 1 [ name 1 data missing 0 name 1 i call 4 name 1 [ name 1 data missing 0 name 1 j nxbins name 1 bins nybins name 1 bins xlab call 3 name 1 [[ name 1 parnames name 1 i ylab call 3 name 1 [[ name 1 parnames name 1 j cex numeric 1 0.5 las numeric 1 1 mgp call 4 name 1 c numeric 1 2.5 numeric 1 0.5 numeric 1 0 labex numeric 1 0 nlevels name 1 levels comment 1 character 1 # comment 1 character 7 # NOTE: If desired, the 2D histograms can be represented as images #\t\tby using the following command # #\t\t\timage(hist2d(data[, i], data[, j], nxbins = bins, #\t\t\t\tnybins = bins), xlab = parnames[[i]], ylab = #\t\t\t\tparnames[[j]], cex = 0.5, las = 1, mgp = c(2.5, #\t\t\t\t0.5, 0))