Re: [R] counting occurrence of text in a dataframe

2009-05-23 Thread Stefan Grosse
On Sat, 23 May 2009 12:44:19 + (GMT) Iain Gallagher wrote: IG> I am hoping for some help with a relatively simple problem. I have IG> a data frame arranged as below. I want to be able to count the IG> occurrence of each gene (eg let-7e) by Experiment. In other words IG> how many times does a

Re: [R] counting occurrence of text in a dataframe

2009-05-23 Thread Gabor Grothendieck
Try this: Lines <- "Tanaka Mitchell Wang Hunter Chen Chim miR-191* let-7e let-7b miR-126let-7a let-7g miR-198let-7f let-7c miR-146a let-7b let-7i miR-22 let-7g miR-1224 miR-16 let-7d miR-130b miR-223let-7i miR-124

[R] counting occurrence of text in a dataframe

2009-05-23 Thread Iain Gallagher
Hello list. I am hoping for some help with a relatively simple problem. I have a data frame arranged as below. I want to be able to count the occurrence of each gene (eg let-7e) by Experiment. In other words how many times does a given gene crop up in the dataframe. I tried table but couldn't