Skip to content
Prev 140680 / 398506 Next

Problem: using cor.test with by( )

Che-hsu (Joe) Chang wrote:
Only the model formula interface to cor.test uses the data argument, so 
you need either

cor.test(x$A,x$B)

or

cor.test(~A+B, data=x)