Description Usage Arguments Value Examples
Often you want to find columns that are all 0s and 1s...or something else like Y and N. This function allows you to determine which columns contain the values you are after. Default is 0 and 1. There is a flag on whether you want to allow NULL for considering the condition to be met.
| 1 2 | ezr.find_columns_containing(dataset, values = c(0, 1),
  allow_null = TRUE, any_or_only = "only", return_only_true = TRUE)
 | 
| dataset | dataframe | 
| values | the values that you want to check for. Default is 0 and 1 (checking for binary columns) | 
| allow_null | Should NULL be allowed? Default is TRUE. This means a condition will be met if NA is found in the column. | 
| any_or_only | ANY = does it contain only these values? Only: Does it contain only these values? | 
| return_only_true | Return a vector of true columns or all columns with trues and falses. | 
vector of columns if return_only_true is TRUE or a dataframe if return_only_true is ALSE
| 1 | #ezr.find_columns_containing(dataset = mtcars, values = c(0,1), allow_null=FALSE, any_or_only ='only', return_only_true = TRUE)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.