5: Summarizing Data with R (with Lucy King)

Statistical Thinking for the 21st Century · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    5: Summarizing Data with R (with Lucy King)

    This chapter will introduce you to how to summarize data using R, as well as providing an introduction to a popular set of R tools known as the “Tidyverse.”

    Before doing anything else we need to load the libraries that we will use in this notebook.

    library(tidyverse)
    library(cowplot)
    library(knitr)
    set.seed(123456)
    opts_chunk$set(tidy.opts=list(width.cutoff=80))
    options(tibble.width = 60)

    We will use the NHANES dataset for several of our examples, so let’s load the library that contains the data.

    # load the NHANES data library
    # first unload it if it's already loaded, to make sure
    # we have a clean version
    
    if("NHANES" %in% (.packages())){
      detach('package:NHANES', unload=TRUE)
    }
    library(NHANES)
    


    This page titled 5: Summarizing Data with R (with Lucy King) was last modified on Mon, 11 Jan 2021 05:13:14 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Russell A. Poldrack via source content that was edited to the style and standards of the LibreTexts platform.