Skip to content
Prev 320587 / 398506 Next

pairs(X,Y) analog of cor(X,Y)?

With a data frame containing some X & Y variables I can get the between 
set correlations
with cor(X,Y):

 > cor(NLSY[,1:2], NLSY[3:6])
           antisoc    hyperact     income      educ
math  0.043381307 -0.07581733 0.25487753 0.2876875
read -0.003735785 -0.07555683 0.09114299 0.1884101

Is there somewhere an analog of pairs(X,Y) that will produce the pairwise
plots of each X against each Y?
The formula method for pairs() is for a one-sided formula.  As a 
formula, I'm looking
for something like

pairs(math + read ~ antisoc +hyperact + income +  educ, data=NLSY)

lattice::xyplot has an extended formula interface, but interprets '+' to 
mean
superposition.