na.keep {Hmisc} | R Documentation

## 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
f.harrell@vanderbilt.edu

### See Also

`na.omit`, `na.delete`, `model.frame.default`, `na.detail.response`, `naresid`, `naprint`, `describe`

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

[Package Hmisc version 3.17-4 Index]