powered by
Removes any numeric column whose missing value proportion exceeds a given threshold.
varidele(data, cols = NULL, fraction = 0.25, verbose = FALSE)
A data frame with the retained columns.
A data frame or matrix containing numeric columns.
Column indices or names of the numeric columns to consider. If NULL, all columns are used.
NULL
Missing proportion threshold. Columns with a missing fraction >= fraction are deleted. Default 0.25.
>= fraction
Logical; if TRUE, prints timing and deleted variables.
TRUE
Chun-Sheng Liang <[email protected]>
The missing fraction is computed after excluding rows where all selected variables are NA. Any column whose missing fraction reaches the threshold is removed, regardless of its position in the selected block.
1. Example data is from https://smear.avaa.csc.fi/download. It includes particle number concentrations in SMEAR I Varrio forest.
varidele(data, cols = 5:65)
Run the code above in your browser using DataLab