Hi Volker! Thanks!!
May be the answer is just ifelse(eq(eq(g1, 1) , 1), 0, 1) But I think must be a better answer...
If eq(g1, 1) it's a conditional for TRUE or FALSE of g1 = 1 How is the conditional for g1 != 1, I mean g1 NOT EQUAL to 1 in this case?