Description Usage Arguments Functions Examples
Do some final polishing of the scrubbed mason analysis data.
1 2 3 4 5 6 7 | polish_renaming(data, renaming.fun, columns = NULL)
polish_filter(data, keep.pattern, column)
polish_transform_estimates(data, transform.fun)
polish_adjust_pvalue(data, method = "BH")
|
data |
The scrubbed object. |
renaming.fun |
A function, typically with |
columns |
The columns to apply the renaming function to. Defaults to columns that are a factor or character vectors. |
keep.pattern |
Rows to keep based on a regular expression pattern. |
column |
The column to apply the filtering to. |
transform.fun |
A function to modify continuous variable columns. |
method |
Correction method for the p-value adjustment
( |
polish_renaming
: polish_renaming
simply takes a function, most
likely one that uses base::gsub()
, and uses that to search and
replace words, etc, in the specified columns.
polish_filter
: polish_filter
is basically a thin wrapper around
dplyr::filter()
, but using base::grepl()
for the
pattern searching.
polish_transform_estimates
: polish_transform_estimates
is simply a thin wrapper
around dplyr::mutate()
.
polish_adjust_pvalue
: polish_adjust_pvalue
is a thin wrapper around
dplyr::mutate()
and stats::p.adjust()
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(magrittr)
ds <- swiss %>%
design('glm') %>%
add_settings() %>%
add_variables('yvar', c('Fertility', 'Education')) %>%
add_variables('xvar', c('Agriculture', 'Catholic')) %>%
add_variables('covariates', 'Examination') %>%
construct() %>%
scrub()
polish_renaming(ds, function(x) gsub('Education', 'Schooling', x))
polish_filter(ds, 'Xterm', 'term')
polish_adjust_pvalue(ds)[c('p.value', 'adj.p.value')]
polish_transform_estimates(ds, function(x) exp(x))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.