[R] Contingency table in R

Ista Zahn izahn at psych.rochester.edu
Wed Mar 2 17:23:18 CET 2011


Hi Laura,

On Wed, Mar 2, 2011 at 9:13 AM, Laura Clasemann <violagirl470 at msn.com> wrote:
>
> Hi,
>
> I have a table in R with data I needed and need to create a contingency table out of it. The table I have so far looks like this:
>
>
>                   Binger
> r
> DietType     No Yes
>  Dangerous  15  12
>  Healthy    52   9
>  None      134  24
>  Unhealthy  72  23
>
> These are the error messages that I keep getting whenever I try to get a contingency table. I'm not sure why it won't work for me, any help would be appreciated!
>> nametable<-table(excat,recat)
> Error in table(excat, recat) : object 'excat' not found

That error seems pretty clear. The table function can't find the excat
data. Is it in a data.frame or a list? Perhaps ?with will point you in
the rigth direction.

Best,
Ista

>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org



More information about the R-help mailing list