Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


sjmisc (version 2.2.0)

descr: Basic descriptive statistics

Description

This function wraps the describe-function and prints a basic descriptive statistic, including variable labels.

Usage

descr(data, ...)

Arguments

data
A vector or a data frame. May also be a grouped data frame (see 'Note' and 'Examples').
...
One or more variables of data that should be printed as table.

Value

A data frame with basic descriptive statistics, derived from the describe-function.

Examples

Run this code
data(efc)
descr(efc, e17age, c160age)

library(dplyr)
efc %>% select(e42dep, e15relat, c172code) %>% descr()

# with grouped data frames
efc %>%
  group_by(e16sex) %>%
  select(e16sex, e42dep, e15relat, c172code) %>%
  descr()

efc %>%
  group_by(e16sex, c172code) %>%
  select(e16sex, c172code, e17age, c160age) %>%
  descr()

Run the code above in your browser using DataLab