[R-pkgs] Package "naflex": Flexible Options for Handling Missing Values

Danny Parsons d@nny @end|ng |rom |dem@@|ntern@t|on@|
Wed Feb 2 17:10:41 CET 2022


Dear all,

I have recently released a new package "naflex" on CRAN:
https://cran.r-project.org/web/packages/naflex/index.html.

"naflex" provides helper functions that give additional flexibility for
handling missing values in summary functions (beyond the current extremes
of na.rm = TRUE/FALSE).

For example, allow up to 20% of values to be missing:

library(naflex)
library(magrittr)
x <- c(1, 3, NA, 4, 3, 2, NA, 5, 8, 7)
mean(x %>% na_omit_if(prop = 0.2))
# 4.125
mean(x %>% na_omit_if(prop = 0.1))
# NA

Please see the package details or vignette for the full set of checks
available.

I hope this may be of use to some as a convenient way to work with various
missing value rules.

Feedback, suggestions and bug reports are welcome at
https://github.com/dannyparsons/naflex or by email
(danny using idems.international)

Best regards,

Danny Parsons

	[[alternative HTML version deleted]]



More information about the R-packages mailing list