make_missing {messy} | R Documentation |
Make missing
Description
Randomly make values missing in all data columns, or a subset of columns
Usage
make_missing(data, cols = NULL, messiness = 0.1, missing = NA)
Arguments
data |
input dataframe |
cols |
set of columns to apply transformation to. If |
messiness |
Percentage of values to change. Must be between 0 and 1. Default 0.1. |
missing |
A single value, vector, or list of what the
missing values will be replaced with. If length is greater
than 1, values will be replaced randomly.
Default |
Value
a dataframe the same size as the input data.
Examples
make_missing(mtcars)
[Package messy version 0.1.0 Index]