Description Usage Arguments Value Examples
View source: R/RemoveSparseFeatures.R
This function deals with zero counts in the counts dataset. If for a feature, the proportion of zeros across the samples is greater than filter_prop, then we remove the feature.
1 | RemoveSparseFeatures(data, filter_prop = 0.9)
|
data |
count data in a sample by feature matrix. |
filter_prop |
threshold proportion. If the proportion of zeros for the feature exceeds this threshold then we remove the feature altogether. Default is 0.9. |
Returns a list with
data |
filtered data with sparse features removed |
sparse_features |
the feature names of the features found sparse and removed |
1 2 3 | mat <- rbind(c(2,0,3,0,4),c(4,5,5,0,0),c(30,34,63,25,0),c(0,0,0,0,0));
RemoveSparseFeatures(mat, filter_prop = 0.5)
RemoveSparseFeatures(mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.