Reputation: 133
I have an object in R include gene_name and their value(TRUE/FALSE) such as below:
TSPAN6 TNMD DPM1 SCYL3 C1orf112
TRUE FALSE FALSE FALSE TRUE
FUCA2 GCLC NFYA STPG1 NIPAL3
TRUE FALSE FALSE TRUE FALSE
The class of object is "logical". My object name is "rest" and I want to get subset from "rest" include just gene name that their value is TRUE. I write my code in R language.
Upvotes: 0
Views: 84
Reputation: 330
If I understand your question properly, you can do that simply by
rest[rest == TRUE]
or if you want to know the names:
names(rest[rest == TRUE])
Upvotes: 1