messy | R Documentation |
Insert NA or another replacement value for some proportion of specified columns to simulate missing data.
messy(data, prop = 0, ..., replace = NA)
data |
the tbl |
prop |
the proportion of data to mess up |
... |
the columns to mess up (as a vector of column names or numbers) |
replace |
the replacement value (defaults to NA) |
the messed up table
messy(iris, 0.1, "Species", replace = "NO SPECIES")
messy(iris, 0.5, 1:4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.