Sorry but I have already tried some links
> dat[dat$products %like% "transcription factor",]
[1] GENE ID Gene products
<0 rows> (or 0-length row.names)
while I know there are 170 transcription factor string in products column
Sorry whatever I am trying to read my file there would be space between column names fro example Gene products columns would be splited to Gene and products columns
dat <- read.table("gene_information-5.txt",fill=TRUE,header = TRUE)
Rhas no way of knowing which name represents a transcription factor. Is the last column expected to containtranscription factorphrase/string?product column is missing in OP. @ jivarajivaraj
In products column for some gene there is transcription factor phrase/string
Hello jivarajivaraj!
This is a pure R question. Please search Stack Overflow
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!
PS: OP, you've done a good job in framing the title of the post, and I see that you're good at extracting key phrases such as "extracting rows" "specific string in column". This is good work, and if you use these to google, you'll get to your solution faster and also enhance and refine your key-phrase building skill, which will help you search a lot more efficiently.
I know it sounds upside down (you learning Google instead of Google learning Natural Language Processing) but the approach works well for now :-)
Please share reproducible data
dput(head(dat)), also avoid using spaces in column names. Most likely you need: