mosaic (version 1.1.0)

cor_test.formula: Alternative formula interface for cor.test

Description

stats::cor.test() in stats accepts formulas of the shape ~ y + x. The mosaic package allows the use of y ~ x as an alternative formula shape.

Usage

cor_test.formula(formula, ...)

cor.test(x, ...)

cor_test.default(x, y, ...)

Arguments

formula

a formula

...

other orguments passed to stats::cor.test().

x, y

numeric vectors of data values. x and y must have the same length.

See Also

stats::cor.test() in the stats package.

Examples

Run this code
# NOT RUN {
# This is an example from example(stats::cor.test) done in old and new style
require(graphics)
cor.test(~ CONT + INTG, data = USJudgeRatings)
cor.test(CONT ~ INTG, data = USJudgeRatings)
# }

Run the code above in your browser using DataLab