Learn R Programming

charlatan (version 0.2.2)

MissingDataProvider: MissingDataProvider

Description

MissingDataProvider

Arguments

Details

Methods

  • make_missing(x) - make missing data - x: a vector of characters, numeric, integers, logicals, etc

This method picks a random number (N) of slots in the input vector x (up to length(x)). Then picks N random positions and replaces them with NA matching the input class.

Examples

Run this code
# NOT RUN {
z <- MissingDataProvider$new()
z$make_missing(x = letters)
# }

Run the code above in your browser using DataLab