Thanks - not sure why it came through scrambled.

This has now been solved - thanks for your help,

Ben Gillespie
Research Postgraduate

School of Geography
University of Leeds
Leeds
LS2 9JT

Tel: +44(0)113 34 33345
Mob: +44(0)770 868 7641
http://www.geog.leeds.ac.uk/
________________________________________
From: PIKAL Petr [via R] [ml-node+s789695n4644005h3@n4.nabble.com]
Sent: 24 September 2012 14:14
To: Benjamin Gillespie
Subject: Re: List creation based on matrix

Hi

Your attachment came scrambled. Something wrong with dput?

anyway

having
> mat<-matrix(1:6, 3,2)
> df<-as.data.frame(mat)
>df$species<-letters[1:3]
> df
  V1 V2 species
a  1  4       a
b  2  5       b
c  3  6       c

> library(reshape)

> melt(df, id="species")
  species variable value
1       a       V1     1
2       b       V1     2
3       c       V1     3
4       a       V2     4
5       b       V2     5
6       c       V2     6


Gives probably what you want

Petr

> -----Original Message-----
> From: Benjamin Gillespie [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4644005&i=0>]
> Sent: Monday, September 24, 2012 2:53 PM
> To: PIKAL Petr; [hidden email]</user/SendEmail.jtp?type=node&node=4644005&i=1>
> Subject: RE: [R] List creation based on matrix
>
> Please see the attached .csv files for further info,
>
> Thanks guys,
>
> Ben Gillespie
> Research Postgraduate
>
> School of Geography
> University of Leeds
> Leeds
> LS2 9JT
>
> Tel: +44(0)113 34 33345
> Mob: +44(0)770 868 7641
> http://www.geog.leeds.ac.uk/
> ________________________________________
> From: PIKAL Petr [[hidden email]</user/SendEmail.jtp?type=node&node=4644005&i=2>]
> Sent: 24 September 2012 13:39
> To: Benjamin Gillespie; [hidden email]</user/SendEmail.jtp?type=node&node=4644005&i=3>
> Subject: RE: [R] List creation based on matrix
>
> Hi
>
> > -----Original Message-----
> > From: [hidden email]</user/SendEmail.jtp?type=node&node=4644005&i=4> [mailto:r-help-bounces@r-
> > project.org] On Behalf Of benrgillespie
> > Sent: Monday, September 24, 2012 1:20 PM
> > To: [hidden email]</user/SendEmail.jtp?type=node&node=4644005&i=5>
> > Subject: [R] List creation based on matrix
> >
> > Hi guys,
> >
> > It would be great if you could help me with this one...
> >
> > I'm looking to create a script to convert a matrix of species
> > abundance
> > e.g:
> >
> > <http://r.789695.n4.nabble.com/file/n4643978/species_matrix.jpg>
> >
> > into two vectors e.g:
> >
> > <http://r.789695.n4.nabble.com/file/n4643978/communitylist.jpg>
> >
> > ----------------
> >
> > If you feel there is no easy answer to this and that it would be
> > easier to do in excel or open office calc (or another program),
> please
> > let me
>
> Not much can be done easier in Excel. If you do not fail to provide
> data you could get better answers.
>
> Regards
> Petr
>
> > know.
> >
> > Thanks in advance for your help and let me know if you require any
> > further information,
> >
> > Ben Gillespie (Research Postgrad)
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://r.789695.n4.nabble.com/List-
> > creation-based-on-matrix-tp4643978.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > [hidden email]</user/SendEmail.jtp?type=node&node=4644005&i=6> 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.

______________________________________________
[hidden email]</user/SendEmail.jtp?type=node&node=4644005&i=7> 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.


________________________________
If you reply to this email, your message will be added to the discussion below:
http://r.789695.n4.nabble.com/List-creation-based-on-matrix-tp4643978p4644005.html
To unsubscribe from List creation based on matrix, click here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4643978&code=Z3licmdAbGVlZHMuYWMudWt8NDY0Mzk3OHw3NTgwMTA1Njg=>.
NAML<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://r.789695.n4.nabble.com/List-creation-based-on-matrix-tp4643978p4644016.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]


