Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

na.keep

Do-nothing na.action


Description

Does not delete rows containing NAs, but does add details concerning the distribution of the response variable if options(na.detail.response=TRUE). This na.action is primarily for use with describe.formula.

Usage

na.keep(mf)

Arguments

mf

a model frame

Value

the same model frame with the "na.action" attribute

Author(s)

Frank Harrell
Department of Biostatistics
Vanderbilt University
fh@fharrell.com

See Also

Examples

options(na.action="na.keep", na.detail.response=TRUE)
x1 <- runif(20)
x2 <- runif(20)
x2[1:4] <- NA
y <- rnorm(20)
describe(y ~ x1*x2)

Hmisc

Harrell Miscellaneous

v4.5-0
GPL (>= 2)
Authors
Frank E Harrell Jr <fh@fharrell.com>, with contributions from Charles Dupont and many others.
Initial release
2021-02-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.