After making scatterplot matrix, I determined I only needed the first 2 columns 
of the matrix so I added verInd=1:2 to my pairs() call.  However, it did not 
turn out as I expected. 

Perhaps the attached pdf of the example code will make it through.  If not, my 
description is "the wrong scatterplot pairs are in the wrong places" for the 
last two pairs() calls.

Thanks,
Chris

################################################################

# fake data
xmat <- matrix(1:28, ncol=4)
lim <- range(xmat)

# what I expected
pairs(xmat, xlim=lim, ylim=lim) # 4x4 matrix of scatterplots
pairs(xmat, xlim=lim, ylim=lim, verInd=1:2, horInd=1:2) # 2x2 matrix of 
scatterplots: upper left

# here comes trouble
pairs(xmat, xlim=lim, ylim=lim, horInd=1:2) # 2x4 matrix of scatterplots: but 
not the top 2 rows (or bottom 2 rows)
pairs(xmat, xlim=lim, ylim=lim, verInd=1:2) # 4x2 matrix of scatterplots: but 
not the left 2 columns (or right 2 columns)


###############################################################

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252  
  LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252   
 

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0   
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be 
used for urgent or sensitive issues 

Attachment: pairs.pdf
Description: pairs.pdf

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to