Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-18 Thread Steve Murray
It sounds like something is going wrong with the melting. Could you please include the output of str(original data frame), and str(melted)? (Or even better a small version of your data created with dput) And this is a str output of the original data frame (first few rows of that

[R] Reshape or Stack? (To produce output as columns)

2008-06-17 Thread Steve Murray
Dear all, I have used 'read.table' to create a data frame of 720 columns and 360 rows (and assigned this to 'Jan'). The row and column names are numeric: columnnames - sprintf(%.2f, seq(from = -179.75, to = 179.75, length = 720)). rnames - sprintf(%.2f, seq(from = -89.75, to = 89.75,

Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-17 Thread Chuck Cleland
On 6/17/2008 6:59 AM, Steve Murray wrote: Dear all, I have used 'read.table' to create a data frame of 720 columns and 360 rows (and assigned this to 'Jan'). The row and column names are numeric: columnnames - sprintf(%.2f, seq(from = -179.75, to = 179.75, length = 720)). rnames -

Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-17 Thread Charilaos Skiadas
On Jun 17, 2008, at 8:06 AM, Chuck Cleland wrote: On 6/17/2008 6:59 AM, Steve Murray wrote: Dear all, I have used 'read.table' to create a data frame of 720 columns and 360 rows (and assigned this to 'Jan'). The row and column names are numeric: columnnames - sprintf(%.2f, seq(from =

Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-17 Thread hadley wickham
On Tue, Jun 17, 2008 at 5:59 AM, Steve Murray [EMAIL PROTECTED] wrote: Dear all, I have used 'read.table' to create a data frame of 720 columns and 360 rows (and assigned this to 'Jan'). The row and column names are numeric: columnnames - sprintf(%.2f, seq(from = -179.75, to = 179.75,

Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-17 Thread Steve Murray
Dear all, Many thanks for the suggestions put forward. I've decided to go with the 'melt' command from the 'reshape' library, as this seems to run the quickest. I do have a couple of questions however, regarding the use of the 'melt' command. Below are the last few lines of the 'melted' data.

Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-17 Thread hadley wickham
On Tue, Jun 17, 2008 at 1:47 PM, Steve Murray [EMAIL PROTECTED] wrote: Dear all, Many thanks for the suggestions put forward. I've decided to go with the 'melt' command from the 'reshape' library, as this seems to run the quickest. I do have a couple of questions however, regarding the use

Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-17 Thread Steve Murray
Dear all, Many thanks for the suggestions put forward. I've decided to go with the 'melt' command from the 'reshape' library, as this seems to run the quickest. I do have a couple of questions however, regarding the use of the 'melt' command. Below are the last few lines of

Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-17 Thread hadley wickham
It sounds like something is going wrong with the melting. Could you please include the output of str(original data frame), and str(melted)? (Or even better a small version of your data created with dput) And this is a str output of the original data frame (first few rows of that displayed