happy: Data related to happiness from the general social survey

Description Usage Format Examples

Description

This dataset provides a small sample of variables related to happiness from the general social survey (GSS). It is a reexport of the productplots::happy dataset, converted into a tibble.

Usage

1

Format

An object of class tbl_df (inherits from tbl, data.frame) with 51020 rows and 10 columns.

Examples

1
2
3
4
5
6
7
8
library(tidyverse)

happy %>%
  na.omit() %>%
  mutate(health = fct_rev(health)) %>%
  ggplot(aes(x = age, y = stat(count))) +
  geom_density(fill = "lightblue") +
  facet_wrap(~health)

wilkelab/practicalgg documentation built on Feb. 6, 2021, 6:52 a.m.