So I am trying to use an if then statement in R or an if then print.
if (Futures$Edge =="NONE") {Futures$Accuracy3->"NA"}
I want to make the accuracy3
NA if the edge is NONE, but after a lot of searching online I can't find one solution that doesn't insist on using ifelse.
I do not want to use ifelse because I have another if else previously that would be negated.
the full code is
Futures$Accuracy3<- ifelse((Futures$Edge =="EDGE") & (Futures$Guess2 == Futures$Result) , 1, 0) if (Futures$Edge =="NONE") {Futures$Accuracy3->"NA"}
I continue to get the error message
Warning message: In if (Futures$Edge == "NONE") { : the condition has length > 1 and only the first element will be used
here is a screenshot of the data.
I do not want any of the NONE edges to print a 0 or 1, simply NA. Not trying to use mutate.