R/panel.corr.R

Defines functions panel.corr

Documented in panel.corr

panel.corr <- function(data,...){
                x<-data$x
                y<-data$y
                points(x, y, pch = 16)
                chh <- par()$cxy[2]
                x1 <- min(x)
                y1 <- max(y) - chh/4
                r1 <- cor(x, y)
                text(x1, y1, paste(round(r1, 3)), cex = 0.8, adj = 0)
        }

Try the DAAG package in your browser

Any scripts or data that you put into this service are public.

DAAG documentation built on May 29, 2024, 9:13 a.m.