---
title: "Week 4 Overview"
format: html
toc: TRUE
editor: source
editor_options: 
  chunk_output_type: inline
---

This wraps up the content for week 3. Now we require some practice! You should head back to our <a href = "https://wolfware.ncsu.edu/" target = "_blank">Moodle site</a> to check out your homework assignment for this week.

We are now ready to really look at bringing data in and how to handle that data more seamlessly. We'll look at working within the `tidyverse`. This is a suite of packages that all work together and allow you to read in data and do most common data manipulations.

## Week 4 Additional Readings/Learning Materials

### Manipulating Data

- <a href="https://r4ds.hadley.nz/data-transform" target="_blank">Chapters 3, 4, and 5 of R 4 Data Science</a>
- (Optional) <a href="https://r-pkgs.org/" target="_blank">R Packages book</a>
- (Optional) <a href="https://cran.r-project.org/web/packages/available_packages_by_name.html" target="_blank">List of CRAN approved packages</a>
- (Optional) <a href="https://support.posit.co/hc/en-us/articles/201057987-Quick-list-of-useful-R-packages" target="_blank"List of useful R packages</a>
  
### Reading Data

- Chapter 7 of R 4 Data Science (opens in new window)

## Week 4 Learning Objectives

Upon completion of this week, students will be able to: (CO is the corresponding course learning objective this helps build toward)

### Reading Data

1. read delimited data, SAS data files, SPSS files, and other file types into R (CO 2)

    a. describe the term delimiter
    b. read comma separated value files into R using the readr package
    c. explain how the read_ functions determine column types
    d. describe the readxl package and its functions
    e. compare and contrast tibbles and data frames

2. write a stored data set to a file using different delimiters (CO 2)

### Manipulating Data

1. use logical statements and indexing vectors to subset common data objects using common functions such as `[`, subset, or dplyr::filter functions (CO 2, 3, 4)
2. list favorable things to look for in an R package (CO 2, 3)

    a. describe the general purpose of the tidyverse package
    b. outline the difference between require and library
    c. explicitly use functions from a particular package using the :: operator
    d. discuss the idea of masking of R functions and objects

3. describe the uses of and program with functions from the dplyr package(CO 2, 3, 4)

    a. explain the benefits of using the dplyr package over base R methods
    b. program with the arrange, filter, select, and rename functions from the dplyr package
    c. optimize selecting variables from a data frame using the select function's options (such as starts_with)
    d. combine functions in the dplry package to subset and summarize a data set in R
    e. describe the uses of and program with the mutate, group_by, and summarise functions in the dplyr R package
    f. combine functions in the dplry package to subset and summarize a data set in R

4. program using the chain of commands or chaining/piping operators (CO 1, 4)

Use the table of contents on the left or the arrows at the bottom of this page to navigate to the next learning material!