[R] import contingency table

Rui Barradas ruipbarradas at sapo.pt
Mon May 28 14:27:28 CEST 2012


Hello,

Try function read.xls in library gdata
Also, a good way of avoiding such doubts is

library(sos)
findFn('xls')

It returns read.xls as the first line.

Hope this helps,

Rui Barradas

Em 28-05-2012 11:32, sylvain willart escreveu:
> hello everyone,
>
> i often work on contingency table that I create from data.frame (with
> table() function)
>
> but a friend sent me an excel sheet wich *already is* a contingency
> table (just a simple 2 way table !...)
>
> any clue on how to import it in R (keeping row names and col names) ?
>
> any tuto I come accross only mention the table transformation, but
> never the import of such data
>
> I only found read.ftable() but couldn't get it to work
>
> any help appreciated
>
> Sylv
>
> ______________________________________________
> 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