R/gauss.cor.R

gauss.cor <- function (x, y)
{
    if (!is.vector(x) || !is.vector(y) || length(x) != length(y))
        stop("'x' and 'y' must be vectors with the same length")

    cor(qnorm(rank(x) / (length(x) + 1)), qnorm(rank(y) / (length(y) + 1)),
        method="pearson")
}

Try the rococo package in your browser

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

rococo documentation built on May 29, 2024, 11:53 a.m.