plotkmeans function 7 data missing 0 kmeansoutput missing 0 parnames missing 0 which call 1 name 1 c bins numeric 1 20 levels numeric 1 10 { 4 comment.expression 2 comment 1 character 10 # # contour2par(): plots the k clusters defined in 'kmeansoutput' (output from #\t\tthe 'kmeans' function) or the subset of clusters specified by #\t\twhich =c(), one at a time, using the same two #\t\tparameters. 'data' should be 2-D and #\t\tshould correspond to 'kmeansoutput'. 'parnames' is the vector of #\t\tparameter names to use with the plots. 'which' is a vector of the #\t\tclusters to plot. If 'which' is not specified, all clusters are #\t\tplotted. 'col' defines the color to use when plotting. # if 2 call 3 name 1 != call 2 name 1 ncol name 1 data numeric 1 2 { 1 call 2 name 1 stop character 1 'data' should have only 2 columns for plotting purposes 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 character 1 ncol(data) and length(parnames) must be equal comment.expression 2 if 2 call 3 name 1 != call 2 name 1 nrow name 1 data call 2 name 1 length call 3 name 1 $ name 1 kmeansoutput character 1 cluster { 1 call 2 name 1 stop character 1 'data' and 'kmeansoutput$cluster' must have the same number of rows (events) comment 1 character 3 # # If all clusters are to be plotted... # if 3 call 3 name 1 != call 2 name 1 length name 1 which numeric 1 0 { 3 call 2 name 1 par mfrow call 3 name 1 c call 2 name 1 ceiling call 3 name 1 + ( 2 name 1 ( call 3 name 1 / call 2 name 1 length name 1 which numeric 1 2 numeric 1 1 numeric 1 2 call 10 name 1 contour call 5 name 1 hist2d call 4 name 1 [ name 1 data missing 0 numeric 1 1 call 4 name 1 [ name 1 data missing 0 numeric 1 2 nxbins name 1 bins nybins name 1 bins xlab call 3 name 1 [ name 1 parnames numeric 1 1 ylab call 3 name 1 [ name 1 parnames numeric 1 2 main character 1 All Events las numeric 1 1 cex numeric 1 0.5 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 for 3 i NULL 0 name 1 which { 5 call 2 name 1 par mar ( 2 name 1 ( call 3 name 1 + call 5 name 1 c numeric 1 5 numeric 1 4 numeric 1 2 numeric 1 1 numeric 1 0.10000000000000001 call 9 name 1 plot call 4 name 1 [ name 1 data missing 0 numeric 1 1 call 4 name 1 [ name 1 data missing 0 numeric 1 2 type character 1 n xlab call 3 name 1 [ name 1 parnames numeric 1 1 ylab call 3 name 1 [ name 1 parnames numeric 1 2 las numeric 1 1 cex numeric 1 0.5 mgp call 4 name 1 c numeric 1 2.5 numeric 1 0.5 numeric 1 0 call 5 name 1 contour call 5 name 1 hist2d call 4 name 1 [ name 1 data call 3 name 1 == call 2 name 1 [ call 3 name 1 $ name 1 kmeansoutput character 1 cluster name 1 i numeric 1 1 call 4 name 1 [ name 1 data call 3 name 1 == call 2 name 1 [ call 3 name 1 $ name 1 kmeansoutput character 1 cluster name 1 i numeric 1 2 nxbins name 1 bins nybins name 1 bins labex numeric 1 0 add name 1 T nlevels name 1 levels call 2 name 1 par cex numeric 1 0.5 call 2 name 1 title call 3 name 1 paste character 1 Cluster name 1 i { 3 call 2 name 1 par mfrow call 3 name 1 c call 2 name 1 ceiling call 3 name 1 / ( 2 name 1 ( call 3 name 1 + call 2 name 1 length call 3 name 1 $ name 1 kmeansoutput character 1 size numeric 1 1 numeric 1 2 numeric 1 2 call 10 name 1 contour call 5 name 1 hist2d call 4 name 1 [ name 1 data missing 0 numeric 1 1 call 4 name 1 [ name 1 data missing 0 numeric 1 2 nxbins name 1 bins nybins name 1 bins xlab call 3 name 1 [ name 1 parnames numeric 1 1 ylab call 3 name 1 [ name 1 parnames numeric 1 2 main character 1 All Events las numeric 1 1 cex numeric 1 0.5 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 for 3 i NULL 0 call 3 name 1 : numeric 1 1 call 2 name 1 length call 3 name 1 $ name 1 kmeansoutput character 1 size { 5 call 2 name 1 par mar ( 2 name 1 ( call 3 name 1 + call 5 name 1 c numeric 1 5 numeric 1 4 numeric 1 2 numeric 1 1 numeric 1 0.10000000000000001 call 9 name 1 plot call 4 name 1 [ name 1 data missing 0 numeric 1 1 call 4 name 1 [ name 1 data missing 0 numeric 1 2 type character 1 n xlab call 3 name 1 [ name 1 parnames numeric 1 1 ylab call 3 name 1 [ name 1 parnames numeric 1 2 las numeric 1 1 cex numeric 1 0.5 mgp call 4 name 1 c numeric 1 2.5 numeric 1 0.5 numeric 1 0 call 5 name 1 contour call 5 name 1 hist2d call 4 name 1 [ name 1 data call 3 name 1 == call 2 name 1 [ call 3 name 1 $ name 1 kmeansoutput character 1 cluster name 1 i numeric 1 1 call 4 name 1 [ name 1 data call 3 name 1 == call 2 name 1 [ call 3 name 1 $ name 1 kmeansoutput character 1 cluster name 1 i numeric 1 2 nxbins name 1 bins nybins name 1 bins labex numeric 1 0 add name 1 T nlevels name 1 levels call 2 name 1 par cex numeric 1 0.5 call 2 name 1 title call 3 name 1 paste character 1 Cluster name 1 i