jitter_metrics | R Documentation |
Convenience wrapper around jitter()
to add a layer of
anonymity to a query. This can be used in combination with anonymise()
to
produce a demo dataset from real data.
jitter_metrics(data, cols = NULL, ...)
data |
Data frame containing a query. |
cols |
Character vector containing the metrics to jitter. When set to
|
... |
Additional arguments to pass to |
data frame where numeric columns specified by cols
are jittered using the
function jitter()
.
anonymise
jittered <- jitter_metrics(pq_data, cols = "Collaboration_hours")
# compare jittered vs original results of top rows
head(
data.frame(
original = pq_data$Collaboration_hours,
jittered = jittered$Collaboration_hours
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.