isum.by: Number summary statistics by groups

Description Usage Arguments Details Author(s) See Also Examples

View source: R/isum.by.R

Description

isum.by generates seven number summary statistics and tests normality on the fly grouped by a categorical variable.

Usage

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

Arguments

x

a numeric object

by

a factor or character object

data

a data frame object (Optional)

rnd

specify rounding of numbers. See round.

na.rm

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

Details

Normality test is perfomed by Shapiro-Wilk Normality Test. See more at shapiro.test.

If the second variable has two levels, it performs either Student's t-test t.test or Wilcoxon test (Mann-Whitney's test) wilcox.test. If more than two levels, ANOVA aov or Kruskal-Wallis rank sum test kruskal.test is carried out to test the difference between different groups.

Author(s)

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

See Also

isum, tab, xtab

Examples

1
2
3
4
5
str(infert)
isum.by(infert$age, infert$education)
isum.by(age, education, data = infert)
isum.by(age, spontaneous, data = infert)
isum.by(age, case, data = infert)

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