Re: [R] Way to convert data frame to matrix

2006-07-01 Thread Charles C. Berry
I think this will do what you want: dframe - read.table(your.text.file, other args as needed ) mat - tapply(dframe[,3],dframe[,1:2],c) On Fri, 30 Jun 2006, Wade Wall wrote: I have a text file that I have imported into R. It contains 3 columns and 316940 rows. The first column is

[R] Way to convert data frame to matrix

2006-06-30 Thread Wade Wall
I have a text file that I have imported into R. It contains 3 columns and 316940 rows. The first column is vegetation plot ID, the second species names and the third is a cover value (numeric). I imported using the read.table function. My problem is this. I need to reformat the information

Re: [R] Way to convert data frame to matrix

2006-06-30 Thread Mike Sears
?as.matrix On Friday 30 June 2006 09:11, Wade Wall wrote: I have a text file that I have imported into R. It contains 3 columns and 316940 rows. The first column is vegetation plot ID, the second species names and the third is a cover value (numeric). I imported using the read.table

Re: [R] Way to convert data frame to matrix

2006-06-30 Thread Duncan Murdoch
On 6/30/2006 10:11 AM, Wade Wall wrote: I have a text file that I have imported into R. It contains 3 columns and 316940 rows. The first column is vegetation plot ID, the second species names and the third is a cover value (numeric). I imported using the read.table function. My problem

Re: [R] Way to convert data frame to matrix

2006-06-30 Thread Philipp Pagel
On Fri, Jun 30, 2006 at 10:11:15AM -0400, Wade Wall wrote: I have a text file that I have imported into R. It contains 3 columns and 316940 rows. The first column is vegetation plot ID, the second species names and the third is a cover value (numeric). I imported using the read.table

Re: [R] Way to convert data frame to matrix

2006-06-30 Thread Sarah Goslee
Hi Wade, On 6/30/06, Wade Wall [EMAIL PROTECTED] wrote: I have a text file that I have imported into R. It contains 3 columns and 316940 rows. The first column is vegetation plot ID, the second species names and the third is a cover value (numeric). I imported using the read.table