summ: Number Summary for numerical data

Description Usage Arguments Details Author(s) See Also Examples

View source: R/summ.R

Description

summ generates seven summary statistics for numerical data and tests for normality on the fly.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
summ(x, data = NULL, rnd = 1, na.rm = FALSE, print.table = TRUE)

## Default S3 method:
summ(...)

## S3 method for class 'numeric'
summ(x, data = NULL, rnd = 1, na.rm = FALSE, print.table = TRUE)

## S3 method for class 'list'
summ(x, data = NULL, rnd = 1, na.rm = FALSE, print.table = TRUE)

## S3 method for class 'data.frame'
summ(x, data = NULL, rnd = 1, na.rm = FALSE, print.table = TRUE)

## Default S3 method:
summBy(...)

## S3 method for class 'numeric'
summBy(x, y, data = NULL, rnd = 1, na.rm = FALSE, print.table = TRUE)

Arguments

x

numeric object, list or data frame

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

print.table

logical value to display formatted outputs

...

optional arguments

y

a factor or character object

Details

summ reports number of observations in the dataset, missing data, seven number summary statistics, coefficient of variation (CV.) and normality test. Normality test is perfomed by Shapiro-Wilk Normality Test. See more at shapiro.test.

CV = Standard Deviation / MEAN * 100

ANNOTATIONS

Obs. = observation

NA. = missing data

Mean = Mean value

Std.Dev = Standard deviation

Median = Median value

Q1 = First quartile or percentile

Q3 = Third quartile or percentile

Min = Minimum value

Max = Maximum value

Normal.test = test by Shapiro-Wilk Normality Test

Author(s)

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

See Also

summBy, tab, xtab

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# single variable
summ(age, infert)
summ(infert$age)

# multiple variable
summ(c(age, case, parity), infert)

# whole dataframe
summ(infert)
summ(iris)
summ(mtcars)

# subset: one category and one number
infert.new <- keep(infert, education, age)
summ(infert.new)

## End(Not run)

myominnoo/mStats_beta documentation built on Feb. 29, 2020, 8:17 a.m.