makemissing: Create random missing data

Description Usage Arguments Value Author(s)

Description

Generates missing entries in data.frame/matrix

Usage

1
2
makemissing(data, p = 0.2, cols = 1:ncol(data), rowwise = FALSE,
  nafun = function(x) x)

Arguments

data

data.frame

p

Fraction of missing data in each column

cols

Which columns (name or index) to alter

rowwise

Should missing occur row-wise (either none or all selected columns are missing)

nafun

(Optional) function to be applied on data.frame before return (e.g. na.omit to return complete-cases only)

Value

data.frame

Author(s)

Klaus K. Holst



Search within the lava package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.