Re: [R] Error : unused arguments in pairs()

2009-01-06 Thread herwig
Dear Sarah, Thank you a lot, It does exactly what I need. By the way, I tried doing what Prof. Ripley suggested I just was not able to get it right - I am pretty new to this after all. Thank again, Herwig Sarah Goslee wrote: > > You didn't do what Prof. Ripley suggested - adding a ... argumen

Re: [R] Error : unused arguments in pairs()

2009-01-06 Thread Sarah Goslee
You didn't do what Prof. Ripley suggested - adding a ... argument. Here's a crude version of what you want; I'm sure there's a more elegant solution for passing the needed data to the panel function. panel.cor <- function(x, y, digits=2, prefix="", splitvar, col.cor, ...) { usr <- par("usr");

Re: [R] Error : unused arguments in pairs()

2009-01-05 Thread herwig
Dear Prof. Ripley, thanks for your reply. Unfortunately I still was not able to solve the problem. I tried it with the Iris data and you can find the code below: > panel.cor <- function(x, y, digits=2, prefix="", cex.cor) { usr <- par("usr"); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)

Re: [R] Error : unused arguments in pairs()

2009-01-05 Thread Prof Brian Ripley
Your panel function should have a ... argument: see the help page for pairs(). Since your example is not 'self-contained' I cannot test this out On Sun, 4 Jan 2009, herwig wrote: Hi there, I am just starting in R and this might be a very basic question. I applied one on the examples o

[R] Error : unused arguments in pairs()

2009-01-04 Thread herwig
Hi there, I am just starting in R and this might be a very basic question. I applied one on the examples of pairs() to my own data. The examples shows scatter plots on one side of the matrix and the correlation coefficients on the other which works well. I then modified it slightly because I wa