[R] why data frame's logical index isnt working

Michael Artz michaeleartz at gmail.com
Fri Apr 8 03:46:25 CEST 2016

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

	[[alternative HTML version deleted]]

More information about the R-help mailing list