Skip to contents

remove observation with too many 0 values

Usage

data_cleaning(data, x = round(ncol(data) * 0.3))

Arguments

data

dataframe of imported dataset, must have first column as ID

x

scales indicate how many 0 to remove

Value

a dataframe without too many 0 observations

Examples

data_cleaning(matrix(c(c(0,1,1,0,0,1,1), c(2,1,0,3,5,2,2), c(1,1,3,2,4,5,1)), 3, 7), 2)
#>   V1 V2 V3 V4 V5 V6
#> 0  0  1  0  2  1  4
#> 1  1  3  8  3  5  6