Learn R Programming

SciencesPo (version 1.3.9)

describe: Statistical description

Description

Provides description of a vector, matrix, data.frame.

Usage

describe(x, ...)

Arguments

x
A data frame, matrix, vector, or formula.
...
Additional arguments passed to describe.default.

Examples

Run this code
describe(turnout)
 desc <- describe(turnout)
 desc$v1   # print description for just v1
 desc[c('v2','v3')]    # print description for two variables.
 desc[sort(names(desc))] # print in alphabetic order by column names.

# Describing part of a data frame:
 with(turnout, describe(v1 ~ v2*v3 + v4) )
 with(turnout, describe(~ v2 + v3) )
 with(turnout, describe(~ v2 + v3, weights=freqs)) # weighted analysis

Run the code above in your browser using DataLab