Learn R Programming

mvdalab (version 1.7)

introNAs: Introduce NA's into a Dataframe

Description

Function for testing missing value imputation algorithms

Usage

introNAs(data, percent = 25)

Arguments

data

a dataset without missing values.

percent

the percent data that should be randomly assigned as missing

Author

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

Details

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

Examples

Run this code
dat <- introNAs(iris)
dat

Run the code above in your browser using DataLab