Re: [R] transform table to matrix

From: Scott Chamberlain <scttchamberlain4_at_gmail.com>
Date: Wed, 02 Mar 2011 20:19:18 -0600

Agreed Peter: weird. What is the purpose of your inquiry SK? And why is your inquiry so similar to the one at the hyperlink I provided?

Scott
On Wednesday, March 2, 2011 at 6:10 PM, P Ehlers wrote:
> Scott Chamberlain wrote:
> > This thread seems freakishly similar to what you are asking....Scott
>
> Even to the point of including the same typo as well as proof
> that neither poster bothered to read the posting guide.
>
> Great spot, Scott!
>
> Peter Ehlers
>
> >
> > http://tolstoy.newcastle.edu.au/R/help/06/07/30127.html
> > On Wednesday, March 2, 2011 at 7:43 AM, SK MAIDUL HAQUE 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 is this. I need to reformat the information as a matrix, with the
> > > first column becoming the row labels and the second the column labels and
> > > the cover values as the matrix cell data. However, since the
> > > read.tablefunction imported the data as an indexed data frame, I can't use
> > > the columns
> > > as vectors. Is there a way around this, to convert the data frame as 3
> > > separate vectors? I have been looking all over for a function, and my
> > > programming skills are not great.
> > >
> > >
> > > --
> > > Sk Maidul Haque
> > > Scientific Officer-C
> > > Applied Spectroscopy Division
> > > Bhabha Atomic Research Centre, Vizag
> > >
> > > Mo: 09666429050/09093458503
> > >
> > > [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > R-help_at_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.
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help_at_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.
>

        [[alternative HTML version deleted]]



R-help_at_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. Received on Thu 03 Mar 2011 - 02:23:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Mar 2011 - 02:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive