On 10/27/2009 07:09 AM, Erin Hodgess wrote:
Dear R People:
Suppose I have a data.frame, x.df, which has one column and 100 rows.
Sometimes I need to see it as 20 rows and 5 columns, sometimes I need
to see it as 10 rows with 10 columns.
Is there a quick way to make those transformations, please?
matrix(unlist(x),nrow=20)
and maybe
byrow=TRUE
depending upon how you want the values distributed.
Jim
______________________________________________
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-contained, reproducible code.