Thanks David (and A.K. arun). I did have the function panel.cor() defined previously in the Mac but not in the windoze. Mac is the main machine.

Thanks again,

N.A.
--
Nestor M. Arguea, Chair
Department of Marketing and Economics
University of West Florida

David Winsemius <mailto:dwinsem...@comcast.net>
February 11, 2014 at 8:12 PM
On Feb 11, 2014, at 12:54 PM, Nestor Arguea wrote:

Command pairs() does not show the correlation coefficient on the upper
diagonal of a set of scatter plots.  The command produces an error in
Windows 7, but it works fine in OS X Mavericks with the same R version
3.0.2.  Platform, R version and example under Windows 7 provided
below.
$platform
[1] "i386-w64-mingw32"
...
$version.string
[1] "R version 3.0.2 (2013-09-25)"

Example:

set.seed(12345)
x<- rnorm(10)
y<- log(c(2:11))
z<- data.frame(x,y)
cor(z)
           x          y
x  1.0000000 -0.4867929
y -0.4867929  1.0000000
pairs(z)
pairs(z,upper.panel=panel.cor)
Error in pairs.default(z, upper.panel = panel.cor) :
  object 'panel.cor' not found

I suspect you copied more of the example on the help page (where panel.cor is 
defined) to the Mac than you did to your Windoze device.


Thanks,

Nestor
--
Nestor Arguea
Chair, Marketing and Economics
Director of International Business Programs
University of West Florida


David Winsemius
Alameda, CA, USA

Nestor Arguea <mailto:narg...@uwf.edu>
February 11, 2014 at 2:54 PM
Command pairs() does not show the correlation coefficient on the upper
diagonal of a set of scatter plots.  The command produces an error in
Windows 7, but it works fine in OS X Mavericks with the same R version
3.0.2.  Platform, R version and example under Windows 7 provided
below.
$platform
[1] "i386-w64-mingw32"
...
$version.string
[1] "R version 3.0.2 (2013-09-25)"

Example:

set.seed(12345)
x<- rnorm(10)
y<- log(c(2:11))
z<- data.frame(x,y)
cor(z)
            x          y
x  1.0000000 -0.4867929
y -0.4867929  1.0000000
pairs(z)
pairs(z,upper.panel=panel.cor)
Error in pairs.default(z, upper.panel = panel.cor) :
   object 'panel.cor' not found

Thanks,

Nestor
______________________________________________
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