Make flextable summarizing frequency

freqTable(x, digits = 1, lang = "en", vanilla = FALSE, ...)

Arguments

x

A vector

digits

integer indicating the number of decimal places

lang

Language. choices are one of c("en","kor")

vanilla

Logical. Whether make vanilla table or not

...

Further arguments to paseed to the df2flextable function

Value

An object of clss flextable

Examples

require(moonBook) freqTable(acs$Dx)
#> type: regulartable object. #> col_keys: `rowname`, `Count`, `Percent`, `Valid Percent`, `Cum Percent` #> header has 1 row(s) #> body has 4 row(s) #> original dataset sample: #> rowname Count Percent Valid Percent Cum Percent #> NSTEMI NSTEMI 153 17.9 17.9 17.9 #> STEMI STEMI 304 35.5 35.5 53.3 #> Unstable Angina Unstable Angina 400 46.7 46.7 100.0 #> Sum Sum 857 100.0 100.0
freqTable(acs$smoking,lang="kor",vanilla=TRUE,fontsize=12)
#> type: regulartable object. #> col_keys: `rowname`, `빈도수`, `백분율`, `유효백분율`, `누적백분율` #> header has 1 row(s) #> body has 4 row(s) #> original dataset sample: #> rowname 빈도수 백분율 유효백분율 누적백분율 #> Ex-smoker Ex-smoker 204 23.8 23.8 23.8 #> Never Never 332 38.7 38.7 62.5 #> Smoker Smoker 321 37.5 37.5 100.0 #> 합계 합계 857 100.0 100.0