[R] Newbie syntax question

Joe Trubisz jtrubisz at mac.com
Sun Jan 13 03:06:08 CET 2008


Hi...

I'm trying to understand the following syntax:

cor.test(~mortality + hardness,data=water,method="pearson")

which is the same as:

cor.test(water$mortality,water$hardness,data=water,method="pearson")

Can anyone point me to the correct doc or explain to me how to  
interpret "~mortality + hardness"?

Thanks,
Joe




More information about the R-help mailing list