rename_redundant: Cosmetically relabel all columns that contains a certain...

Description Usage Arguments Details Value Author(s) Examples

View source: R/relabel_proportions.R

Description

These function are only to be used cosmetically before kable and will likely return a data frame with duplicate names.

Usage

1
2
3

Arguments

x

a data frame

...

a series of keys and values to replace columns that match specific patterns.

Details

Value

a data frame.

Author(s)

Zhian N. Kamvar

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
df <- data.frame(
  x = letters[1:10],
  `a n` = 1:10,
  `a prop` = (1:10) / 10,
  `a deff` = round(pi, 2),
  `b n` = 10:1,
  `b prop` = (10:1) / 10,
  `b deff` = round(pi * 2, 2),
  check.names = FALSE
)
df
print(df <- rename_redundant(df, "%" = "prop", "Design Effect" = "deff"))
print(df <- augment_redundant(df, " (n)" = " n$"))

epikit documentation built on Sept. 8, 2020, 1:06 a.m.