I would like to return the result in a vector based on the results of an if statement. My default value in the column would be "blank" and if both conditions are met ==FALSE I would like the vector/cell to have "some text". Here is what I have so far:
COMP30$Test_3<-"blank"
matches<-list(c(COMP30$PMPI_Has_Plan,COMP30$PMPI_Is_Eligible,COMP30$Test_3))
for (match in matches){if (match[1]==FALSE & match[2]==FALSE){match[3]<-"some text"}}
After running, I am showing only "blank" even though there are instances of ==FALSE & ==FALSE. Basically, either the condition is not evaluating or the result is not being returned. Just started learning R so I am not sure what I am missing. Thanks!
matchin the loop that is erased at each iteration. Modifymatchesinstead