na.bootstrap: na.bootstrap

Description Usage Arguments Details Note See Also Examples

View source: R/na.sample.R

Description

Replace missing values with value randomly drawn from x

Usage

1
2
3

Arguments

.x

vector with

...

additional arguments passed to base::sample()

Details

na.random replaces missing values by sampling the non-missing values. By default aampling occurs with replacement since more valuables may be needed than are available. This function is based on base::sample().

The default is to replace bv sampling a population defined by the non-missing values of .x with replacement

na.random is an alias for na.bootstrap. '

Note

na.bootstrap is non-deterministic. Use base::set.seed() to make it deterministic

See Also

Examples

1
2
3
  x <- c(1,NA,3)
  na.bootstrap(x)
  

na.tools documentation built on June 26, 2018, 5:02 p.m.