mysummary: A more complete summary

View source: R/mysummary.R

mysummaryR Documentation

A more complete summary

Description

a more complete summary that applyes for both numeric and factor vectors.

Usage

mysummary(x, p = c(0, 0.025, 0.25, 0.5, 0.75, 0.975, 1))

Arguments

x

numeric vector or factor

p

percentiles for computing quantiles when x is a numeric vector.

Value

a named vector with the length of x, number of NA's and mean, sd an quantiles if x is numeric or frequencies if x is factor.

Examples

mysummary(iris[,1])
mysummary(iris[,2])

eliaskrainski/emisc documentation built on Nov. 18, 2024, 11:02 a.m.