str_comb_Prop: Create count with proportion as string

Description Usage Arguments Value Examples

Description

Create count with proportion as string

Usage

1
2
3
str_comb_prop(x, category = NULL, na.rm = T, digits = 1,
  out = c("percentage", "percent"), perc.disp = F, escape = F,
  zero2dash = T)

Arguments

x

vector

category

Category to count x matches (not required if x logical)

digits

number of digits to round

out

single character representing output for proportion

perc.disp

logical for inclusion of % sign

escape

logical for inclusion of escape character for LaTeX tables

zero2dash

logical for returning "-" instead of "0 (0)" for tables

Value

Character String of the form "N ( % )"

Examples

1
2
3
4
5
x = sample(1:3, size = 20, replace = T)
str_comb_prop(x, category = 2,digits = 3)
str_comb_prop(x, category = 1, out = "percent")
str_comb_prop(x == 1)
str_comb_prop(x %in% 1:3)

Ajfrick/AVRCHelp documentation built on May 28, 2019, 1:34 a.m.