powered by
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.
stats::cor.test()
~ y + x
y ~ x
# S3 method for formula cor_test(formula, ...)cor.test(x, ...)cor_test(x, ...)# S3 method for default cor_test(x, y, ...)
cor.test(x, ...)
cor_test(x, ...)
# S3 method for default cor_test(x, y, ...)
a formula
other arguments passed to stats::cor.test().
numeric vectors of data values. x and y must have the same length.
stats::cor.test() in the stats package.
# 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