handleNA {CountClust} | R Documentation

## Deal with NAs in the dataset!

### 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

    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

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

[Package CountClust version 1.12.0 Index]