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.

--
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept. & Chair, Quantitative Methods
York University      Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA

______________________________________________
R-help@r-project.org mailing list
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