Skip to content
Prev 359902 / 398503 Next

why data frame's logical index isnt working

data.frame.$columnToAdd["CurrentColumnName" == "ConditionMet"] <- 1

Can someone please explain to me why the above command gives all NAs to
columnToAdd?  I thought this was possible in R to do logical expression in
the index of a data frame