handleNA: Deal with NAs in the dataset!

Description Usage Arguments Details Value Examples

View source: R/handleNA.R

Description

This function handles the NA values in the count data. If for a feature, the proportion of NAs is greater than threshold proportion, then we remove the feature, otherwise we use MAR substitution scheme using the distribution of the non NA values for the feature. If threshold proportion is 0, it implies removal of all features with NA values. Default value of threshold proportion is 0.

Usage

1
handleNA(data, thresh_prop = 0)

Arguments

data

count data in a sample by feature matrix.

thresh_prop

threshold proportion of NAs for removal of feature or replacing the NA values.

Details

This function removes NAs from the counts data

Value

Returns a list with

data

The modified data with NA substitution and removal

na_removed_cols

The columns in the data with NAs that were removed

na_sub_cols

The columns in the data with NAs that were substituted

Examples

1
2
3
mat <- rbind(c(2,4,NA),c(4,7,8),c(3,NA,NA));
handleNA(mat,thresh_prop=0.5)
handleNA(mat)

kkdey/CountClust documentation built on Jan. 17, 2021, 5:32 p.m.