# NOT RUN {
v1 <- c(4, 3, 8, 6, 9, 5, NA, 0, 7, 4)
# Format count and percent
fmt_cnt_pct(v1)
# Output
# "4 ( 44.4%)" "3 ( 33.3%)" "8 ( 88.9%)" "6 ( 66.7%)" "9 (100.0%)"
# "5 ( 55.6%)" NA "0 ( 0.0%)" "7 ( 77.8%)" "4 ( 44.4%)"
# }
Run the code above in your browser using DataLab