[R] Getting a list of unique gene names from a list with semi-colons

2012-01-06 Thread Kurinji Pandiyan
Hello, I have one column in my dataframe that has gene names of interest. Unfortunately, due to the fact that some probes lie between two genes or two transcripts of a gene, it looks something like this - FAM81A LOC283050;LOC283050;LOC283050;ZMIZ1 PINK1;PINK1 MRPL12;MRPL12 C1orf114

Re: [R] Getting a list of unique gene names from a list with semi-colons

2012-01-06 Thread R. Michael Weylandt michael.weyla...@gmail.com
I think you can do this with something like this (untested): unique(unlist(strsplit(XXX, ,))) Michael On Jan 6, 2012, at 8:05 PM, Kurinji Pandiyan kurinji.pandi...@gmail.com wrote: Hello, I have one column in my dataframe that has gene names of interest. Unfortunately, due to the fact

Re: [R] Getting a list of unique gene names from a list with semi-colons

2012-01-06 Thread Gabor Grothendieck
On Fri, Jan 6, 2012 at 9:05 PM, Kurinji Pandiyan kurinji.pandi...@gmail.com wrote: Hello, I have one column in my dataframe that has gene names of interest. Unfortunately, due to the fact that some probes lie between two genes or two transcripts of a gene, it looks something like this -  

Re: [R] Getting a list of unique gene names from a list with semi-colons

2012-01-06 Thread R. Michael Weylandt michael.weyla...@gmail.com
Sorry. - that should be a semi-colon below. Michael Weylandt On Jan 6, 2012, at 8:17 PM, R. Michael Weylandt michael.weyla...@gmail.com michael.weyla...@gmail.com wrote: I think you can do this with something like this (untested): unique(unlist(strsplit(XXX, ,))) Michael On Jan 6,