Homework Module 1.3

Your Name

Date

In the questions below, use R code to answer questions. For any non-coding questions, give your answer as a comment.

Run this code chunk first, to make the survey data available as the variable classData:

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
classData<-read_csv("teamAntarcticaData.csv")
Rows: 75 Columns: 12
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (7): Timestamp, school, swim, animals, parkaColor, teamFlag, distance
dbl (5): fishing, cold, remote, bedsideManner, cooking

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
  1. Create a subset of classData of students who responded less than 3 on the fishing question, called poorFishing. How many reported less than 3?
  1. Describe logical operators, and how they can be used in the filter function:
  1. How many Lewis & Clark students voted to have the bear as the team flag? Show code below how you would derive your answer:
  1. What is the “pipe” in R? What is it used for?
  1. Determine the mean and standard deviation of self-reported bedside manner, comparing Lewis & Clark to University of Arizona students:
  1. Create a data set showing the percentage of votes for team flag animal, just for Lewis & Clark students: