[R] Contingency table in R

John Kane jrkrideau at yahoo.ca
Sat Mar 5 16:04:06 CET 2011


Did you get a reply on this?

We really need to see your code and some sample data.

Have a look at ?dput tko supply some data.  

At the moment it looks like R is not recognizing the dara set.  If ls( libts the dataset, are you using mydara$excat

--- On Wed, 3/2/11, Laura Clasemann <violagirl470 at msn.com> wrote:

> From: Laura Clasemann <violagirl470 at msn.com>
> Subject: [R] Contingency table in R
> To: r-help at r-project.org
> Received: Wednesday, March 2, 2011, 9:13 AM
> 
> 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
>     
>         
>           
>   
>     [[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.
> 





More information about the R-help mailing list