muddle | R Documentation |
Shuffle any of the columns of a data.frame
to artificially distort relationships.
muddle( data, at, ... )
data |
A |
at |
A vector of quoted/unquoted columns, positions, and/or |
... |
Additional arguments passed to |
A tibble::tibble
Alex Zajichek
#Set a seed set.seed(123) #Default permutes all columns heart_disease %>% muddle #Permute select columns heart_disease %>% muddle( at = c(Age, Sex) ) #Using a select helper heart_disease %>% muddle( at = matches("^S") ) #Pass other arguments heart_disease %>% muddle( size = 5, replace = TRUE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.