Introduce NA's into a Dataframe

Share:

Description

Function for testing missing value imputation algorithms

Usage

1
introNAs(data, percent = 25)

Arguments

data

a dataset without missing values.

percent

the percent data that should be randomly assigned as missing

Details

A completed data frame is returned with the desired percentage of missing data. NAs are assigned at random.

Author(s)

Nelson Lee Afanador (nelson.afanador@mvdalab.com)

Examples

1
2
dat <- introNAs(iris)
dat

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.