tab: Frequency distribution

Description Usage Arguments Details Author(s) See Also Examples

View source: R/tab.R

Description

tab generates Frequency distribution of a variable.

Usage

1
tab(x, data = NULL, na.rm = FALSE, rnd = 1)

Arguments

x

a factor object

data

a data frame object (Optional)

na.rm

A logical value to specify missing values, <NA> in the table

rnd

specify rounding of numbers. See round.

Details

Exploring data before jumping into complex analysis is always a necessity. The first step of an analysis is always to summarize and display data.

tab produce one-way table of frequencies.

References:

  1. Essential Medical Statistics, Betty R. Kirkwood & Jonathan A.C. Sterne, Second Edition. Chapter 3

  2. An Introduction to MEdical Statistics, Martin Bland, Thrid Edition, Chapter 4

Author(s)

Myo Minn Oo (Email: dr.myominnoo@gmail.com | Website: https://myominnoo.github.io/)

See Also

xtab

Examples

1
2
3
4
str(infert)
tab(infert$education)
tab(education, data = infert)
tab(spontaneous, data = infert)

myominnoo/stats2 documentation built on Nov. 4, 2019, 8:33 p.m.