is there some way to convert this data:
(Intercept) Timecoursecdc15 Timecoursecdc28 Timecourseclb Timecoursecln
YAL001C FALSE FALSE FALSE FALSE FALSE
YAL002W FALSE FALSE FALSE FALSE FALSE
YAL003W FALSE FALSE FALSE FALSE FALSE
YAL004W FALSE FALSE FALSE FALSE FALSE
YAL005C FALSE FALSE FALSE FALSE FALSE
YAL007C FALSE FALSE FALSE FALSE TRUE
to something like this:
YPR163C YPR164W YPR165W YPR166C YPR167C YPR168W YPR169W YPR170C
FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE
YPR171W YPR172W YPR173C YPR174C YPR175W YPR176C YPR177C YPR178W
FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
YPR179C YPR180W YPR181C YPR182W YPR183W YPR184W YPR185W YPR186C
FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
YPR187W YPR188C YPR189W YPR190C YPR191W YPR192W YPR193C YPR194C
FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE
YPR195C YPR196W YPR197C YPR198W YPR199C YPR200C YPR201W YPR202W
FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
So, looking at the values of each row, if any row contains TRUE, then YAL007C
is TRUE
.
Like this:
rowSums(dat) > 0L
which will be a lot faster than using a loop or apply...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With