add_blur | R Documentation |
add_blur()
adds an bluring step to a transformation pipeline
(NB: intended for categorical data). When ran as a transformation, values
are recoded to a lower cardinality as defined by blur
.
#'
add_blur(object, ..., blur = c())
object |
Either a |
... |
variables to be transformed. |
blur |
a key-value pair such that 'key' is replaced by 'value' on transformation. |
A 'DeidentList' representing the untrained transformation pipeline. The object contains fields:
deident_methods
a list of each step in the pipeline (consisting of variables
and method
)
and methods:
mutate
apply the pipeline to a new data set
to_yaml
serialize the pipeline to a '.yml' file
category_blur()
is provided to aid in defining the blur
.blur <- category_blur(ShiftsWorked$Shift, `Working` = "Day|Night")
pipe.blur <- add_blur(ShiftsWorked, `Shift`, blur = .blur)
pipe.blur$mutate(ShiftsWorked)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.