na.replace: Replace Missing Values

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/na.replace.R

Description

Replace missing values

Usage

1

Arguments

x

vector possibly contining missing (NA) values.

replace

scalar replacement value

Details

This is a convenience function that is the same as x[is.na(x)] <- replace

Value

Vector with missing values (NA) replaced by the value of replace.

Author(s)

Gregory R. Warnes [email protected]s.net

See Also

is.na, na.omit

Examples

1
2
   x <- c(1,2,3,NA,6,7,8,NA,NA)
   na.replace(x, '999')

gtools documentation built on May 30, 2017, 1:58 a.m.

Related to na.replace in gtools...