Re: [R] Newbie syntax question

From: jim holtman <jholtman_at_gmail.com>
Date: Sat, 12 Jan 2008 22:08:39 -0500

?cor.test

and the help page says:

formula: a formula of the form ~ u + v, where each of u and v are numeric variables giving the data values for one sample. The samples must be of the same length.

On 1/12/08, Joe Trubisz <jtrubisz_at_mac.com> wrote:
> 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
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 13 Jan 2008 - 03:14:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 Jan 2008 - 16:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive