Re: [R] splitting a dataframe in R based on multiple gene names in a specific column

2017-08-26 Thread Jim Lemon
Very tidy. Amazing what is hidden away in R packages. Jim On Sat, Aug 26, 2017 at 5:26 AM, Jeff Newmiller wrote: > If row numbers can be dispensed with, then tidyr makes this easy with the > unnest function: > > # > library(dplyr) > #> > #> Attaching package:

Re: [R] splitting a dataframe in R based on multiple gene names in a specific column

2017-08-25 Thread Jeff Newmiller
If row numbers can be dispensed with, then tidyr makes this easy with the unnest function: # library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #>

Re: [R] splitting a dataframe in R based on multiple gene names in a specific column

2017-08-22 Thread Jim Lemon
Hi Bogdan, Messy, and very specific to your problem: df.sample.gene<-read.table( text="Chr Start End Ref Alt Func.refGene Gene.refGene 284 chr2 16080996 16080996 C T ncRNA_exonic GACAT3 448 chr2 113979920 113979920 C T ncRNA_exonic LINC01191,LOC100499194 465 chr2

[R] splitting a dataframe in R based on multiple gene names in a specific column

2017-08-22 Thread Bogdan Tanasa
I would appreciate please a suggestion on how to do the following : i'm working with a dataframe in R that contains in a specific column multiple gene names, eg : > df.sample.gene[15:20,2:8] Chr Start End Ref Alt Func.refGene Gene.refGene284 chr2 16080996 16080996 C T