I have the following data frame in R
> head(genes)
Genes
1 APOBEC4
2 B3GALT2
3 C1orf127
4 CAMK1G
5 CAMTA1
6 EPHX1
I have a vector with row indexes.
> head(sig)
[1] 10 11 41 54 125 126
Now I want to add another columns to data frame genes, such that the rows at the index sig will get a values "Yes" and otherwise "NO"
Something like:
head(genes)
Genes Sig
1 APOBEC4 NO
2 B3GALT2 NO
3 C1orf127 NO
4 CAMK1G NO
5 CAMTA1 NO
...
10 XXX YES
...
41 YYY YES
I tried but I could not find a solution.