Across a df to count TRUE and FALSE
across_df_TF.RdThis function summarizes both TRUE and FALSE values in each column of a data frame.
Examples
df <- data.frame(a = c(TRUE, FALSE, TRUE, TRUE), b = c(FALSE, TRUE, TRUE, TRUE))
across_df_TF(df) # Count TRUE (default)
#> a b
#> 1 3 3
across_df_TF(df, "F") # Count FALSE
#> a b
#> 1 1 1