with this code i pretend to delete the rows in the a
column which have the word "TRUE"
.
DATA2 <- DATA[!DATA$a == "TRUE”]
However, I have "TRUE"
, "FALSE"
and "NA"
. When I run this code R deletes the NA's as well. How can i skip this and only delete the rows with a "TRUE"?
I've already tried this one, but without success...
DATA2 <- DATA[!DATA$a=='TRUE',na.rm= FALSE]
Error:
Error in `[.data.frame`(DATA, !DATA$a == "TRUE", :
unused argument (na.rm = FALSE)