polish: Do some final polishing of the scrubbed mason analysis data.

Description Usage Arguments Functions Examples

Description

Do some final polishing of the scrubbed mason analysis data.

Usage

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")

Arguments

data

The scrubbed object.

renaming.fun

A function, typically with base::gsub(), that searches and replaces strings.

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 (stats::p.adjust()).

Functions

Examples

 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))

mason documentation built on July 1, 2020, 5:48 p.m.