filter_rare_table_cols | R Documentation |
Filters dataframe columns with either a low absolute count of non-zero values or a low proportion of rows with non-zero counts. Note that this function is intended for positively-bounded data only (e.g., the function or taxon abundance tables), and will not work properly if the table contains negative values. Included in package simply to make running workflow easier.
filter_rare_table_cols( in_tab, min_nonzero_count, min_nonzero_prop, drop_missing_rows = TRUE, verbose = TRUE )
in_tab |
input dataframe |
min_nonzero_count |
minimum number of cells in column that must be non-zero for column to be retained. |
min_nonzero_prop |
minimum proportion of cells in column that must be non-zero for column to be retained. |
drop_missing_rows |
boolean flag to indicate whether rows with all zero values (after dropping columns based on specified cut-offs) should be removed. |
verbose |
boolean flag to indicate that the number of columns removed should be written to the console. |
dataframe with columns that did not meet the min_nonzero_count
and/or min_nonzero_prop
options removed (and potentially rows dropped too if drop_missing_rows=TRUE).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.