Give simple descriptive statistics for a matrix or a data frame

Share:

Description

This function is designed to emulate the Minitab function DESCRIBE. It gives simple descriptive statistics for a data frame

Usage

1
describe(x, varNames = NULL)

Arguments

x

A matrix or data.frame with numeric entries. Different variables are represented by columns.

varNames

A vector of variable names for each of the columns

Value

A data.frame containing the following elements:

N

The number of observations for each variable

mean

The sample mean for each variable

stdev

The sample standard deviation

sterr

The standard error of the mean

min

The minimum

q1

The lower quartile

med

The median

q3

The upper quartile

max

The maximum

Examples

1
2