[R] Data frame as table

Rui Barradas ruipbarradas at sapo.pt
Mon Feb 25 15:10:21 CET 2013


Hello,

If your data.frame is named 'dat', the following might be what you want.

as.table(data.matrix(dat))


Hope this helps,

Rui Barradas

Em 25-02-2013 11:35, Franck.BERTHUIT at maif.fr escreveu:
> Hello R user's,
>
> I've read a txt file with the read.table syntax. This file is already in a
> form of a contingency table (130 rows, 90 columns) with wich i would like
> to do a simple correspondance analysis with the ca() syntax.
> Are there a way to do an as.table(my data.frame) transformation ? Or are
> there some kind of read.table procedure that charge the file as table and
> not data.frame ?
>
> Thank you in advance.
>
>
> Franck Berthuit
> France
> 	[[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