knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Setup

Type library(statdata) and then, datasets in the statdata package are avaiable.

library(dplyr)
library(readr)
library(magrittr)
library(purrr)
library(fs)
library(skimr)
library(statdata)

Load Sample Dataset

kicks_num dataset contains number of success in the traditional Korean game, Jegichagi.

data("kicks_num")
kicks_num <- kicks_num %>% 
  set_names('count')

kicks_num

Basic Analysis

skimr package contains skim() function, which is an improved version of summary function. This one line command spits out all the descriptive statstics needed to understand the continuous variable.

skimr::skim(kicks_num)

Visualization

We can visualize the univariate continouse variable with histogram or stem-and-leaf plot. There are various ways to visualize histogram, but the simplest way is to use hist().

hist(kicks_num$count)

The stem-and-leaf plot is also possible.

stem(kicks_num$count)


tidyverse-korea/statdata documentation built on Dec. 23, 2021, 10:54 a.m.