You have to use the formula interface, so something like this:
cor.test(~ Alt + Cab, data=adults, alternative="greater", subset=Sex=="male")
David
On Wed, Mar 19, 2008 at 12:59 PM, James J. Roper <[EMAIL PROTECTED]> wrote:
> The correlation test function says that it can do a subset where one
>
James J. Roper gmail.com> writes:
>
> The correlation test function says that it can do a subset where one
> specifies the subsete vector. I cannot seem to get it to work.
>
> For example, the command line is:
>
> cor.test(adults$Alt, adults$Cab, alternative="greater", method="pearson")
>
>
The correlation test function says that it can do a subset where one
specifies the subsete vector. I cannot seem to get it to work.
For example, the command line is:
cor.test(adults$Alt, adults$Cab, alternative="greater", method="pearson")
So, let´s say my subset vector is "Sex". How would I
3 matches
Mail list logo