MissingDataProvider: MissingDataProvider

MissingDataProviderR Documentation

MissingDataProvider

Description

make missing data

Super class

charlatan::BareProvider -> MissingDataProvider

Methods

Public 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

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

ropensci/charlatan documentation built on Oct. 24, 2023, 9:15 a.m.