[R] Table to Data-frame

2009-08-03 Thread Olivier Peron
Hello How to pass from table to data-frame ? Thanks __ R-help@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

Re: [R] Table to Data-frame

2009-08-03 Thread David Winsemius
On Aug 3, 2009, at 10:35 AM, Olivier Peron wrote: Hello How to pass from table to data-frame ? Copied from the help page for table: The as.data.frame method for objects inheriting from class table can be used to convert the array-based representation of a contingency table to a data

Re: [R] Table to Data-frame

2009-08-03 Thread Paulo Eduardo Cardoso
as.data.frame(table())? 2009/8/3 Olivier Peron olivier.pe...@univ-pau.fr Hello How to pass from table to data-frame ? Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Table to Data-frame

2009-08-03 Thread Steve Lianoglou
Hi, On Aug 3, 2009, at 10:35 AM, Olivier Peron wrote: Hello How to pass from table to data-frame ? R a - sample(LETTERS[1:10], 20, replace=T) R b - table(a) R c - as.data.frame(b) R c a Freq 1 A4 2 B2 3 C1 4 D4 5 E1 6 F1 7 H1 8 J6 -steve -- Steve

Re: [R] Table to Data-frame

2009-08-03 Thread Jorge Ivan Velez
Hi Olivier, How about this? # some data x - rpois(100,5) # the table table(x) # converting the table as.data.frame.table(table(x)) HTH, Jorge On Mon, Aug 3, 2009 at 10:35 AM, Olivier Peron olivier.pe...@univ-pau.frwrote: Hello How to pass from table to data-frame ? Thanks