Skip to content
Prev 388096 / 398502 Next

R grep question

Hello,

ifelse needs a logical condition, not the value. Try grepl.


CRC$MMR.gene <- ifelse(grepl("MLH1"|"MSH2",CRC$gene.all), "Yes", "No")


Hope this helps,

Rui Barradas

?s 05:29 de 27/05/21, Kai Yang via R-help escreveu: