Re: [R] R help

From: Moshe Olshansky <m_olshansky_at_yahoo.com>
Date: Mon, 23 Jun 2008 22:31:38 -0700 (PDT)


You can use

split(x$Snp_ID,x$Gene)

where x is your data.frame (see ?split).

> From: Rajasekaramya <ramya.victory_at_gmail.com>
> Subject: [R] R help
> To: r-help@r-project.org
> Received: Tuesday, 24 June, 2008, 2:27 PM
> Hi there,
>
> I am very new to R.I have to write the code for the
> following scenario
>
> Snp_Id Gene name score
> 1 a
> 2 b
> 3 a
> 4 b
> are the three columns in my table.There are many snp,s for
> a particular
> gene.I have to group all the snp to its corresponding
> genname.
>
> my output should be
>
> genename a should have both the gene id 1 and 3.
> genename b should have gene id 2 and 4
>
> Kindly help me.
> Ramya Thulasingam
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/R-help-tp18083552p18083552.html
> Sent from the R help mailing list archive at Nabble.com.
>
> [[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.



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 Tue 24 Jun 2008 - 08:44:57 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 Tue 24 Jun 2008 - 10:31:01 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