Learn R Programming

charlatan (version 0.6.1)

MissingDataProvider: MissingDataProvider

Description

make missing data

Arguments

Super class

charlatan::BareProvider -> MissingDataProvider

Methods

Inherited methods


Method make_missing()

make missing data

Usage

MissingDataProvider$make_missing(x)

Arguments

x

a vector of characters, numeric, integers, logicals, etc

Details

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.


Method clone()

The objects of this class are cloneable with this method.

Usage

MissingDataProvider$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
z <- MissingDataProvider$new()
z$make_missing(x = letters)

Run the code above in your browser using DataLab