I have found multiple answers where one can select a row based on a value of a column, but I need the reverse. Consider this example:
library(dplyr)
df <- readr::read_table2("Location Site Species Date Time
TRUE TRUE TRUE TRUE TRUE
TRUE TRUE TRUE TRUE TRUE
TRUE TRUE FALSE TRUE FALSE
TRUE TRUE TRUE TRUE TRUE
TRUE TRUE TRUE TRUE TRUE
TRUE TRUE TRUE TRUE TRUE")
How can I get the columns or column names which have the values FALSE, considering I know it is in the third row.
I tried something like this: df[3,df[3,]==FALSE], but this gives me an error.