Re: [R] converting a table to a dataframe or a matrix

2008-06-04 Thread Gabor Grothendieck
Either of these will do it: head(temp, Inf) class(temp) <- "matrix" On Wed, Jun 4, 2008 at 3:20 PM, <[EMAIL PROTECTED]> wrote: > > can someone show me how to convert a table to a data.frame or a matrix ? I > tried below and as.data.frame rearranges the columns > similarly to a melt from reshape

Re: [R] converting a table to a dataframe or a matrix

2008-06-04 Thread Henrique Dallazuanna
Hi Mark, Try this: as.data.frame.matrix(temp) or as.data.frame(unclass(temp)) On Wed, Jun 4, 2008 at 4:20 PM, <[EMAIL PROTECTED]> wrote: > > can someone show me how to convert a table to a data.frame or a matrix ? I > tried below and as.data.frame rearranges the columns > similarly to a melt

[R] converting a table to a dataframe or a matrix

2008-06-04 Thread markleeds
can someone show me how to convert a table to a data.frame or a matrix ? I tried below and as.data.frame rearranges the columns similarly to a melt from reshape and as.matrix didn't change it. I actually would prefer to change it to a dataframe but if someone can show me how to convert it to a