I have a data frame with two columns have TRUE and FALSE and i want exclude records having both the columns have true values .
i am trying to apply the same in commented code below any solution ...??
df <- data.frame(column1=c("TRUE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", "TRUE", "TRUE", "FALSE", "TRUE"),
column2 =c("TRUE", "FALSE", "TRUE", "TRUE", "TRUE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE"))
#compare_df <- df1_long %>%
# full_join(df2_long, by=c("Names", "options"), keep = TRUE) %>%
# distinct(Names.x, options.x, Names.y, options.y) %>%
#arrange(Names.x, Names.y, options.x, options.y) %>%
# mutate(
# consistant_names = !is.na(Names.x) & !is.na(Names.y),
# consistant_options = !is.na(options.x) & !is.na(options.y)
#)
required output should be look like
| column1 |
column2 |
| FALSE |
FALSE |
| TRUE |
FALSE |
| FALSE |
TRUE |