1 Set Up Packages and Import Data

knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
## -- Attaching packages -------------------------------------------------------------------------------- tidyverse 1.2.1 --
## v ggplot2 2.2.1     v purrr   0.2.4
## v tibble  1.4.1     v dplyr   0.7.4
## v tidyr   0.7.2     v stringr 1.2.0
## v readr   1.1.1     v forcats 0.2.0
## -- Conflicts ----------------------------------------------------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(dplyr)
Fac_Writing <- read.csv("C:/LocalFiles/Documents/Freshman TSU/STAT-220/HW 2/FacWriting.csv")
write.csv(Fac_Writing, file="FacWriting")
FacWriting <- Fac_Writing
View(Fac_Writing)

The following link explains section numbering:

https://rmarkdown.rstudio.com/html_document_format.html#section_numbering

This command adds section numbering to headers.

2 Make a new version of the Fac_Writing, named “TTFac”

TTFac <- Fac_Writing
View(TTFac)

2.1 Limit your dataset to those respondents who identified as Tenure-Track (Q26)

TTFac <- Fac_Writing
TTFac <- filter(Fac_Writing, Title == "TT")

2.2 Select these variables

2.2.1 Those about a faculty member’s comfort with writing (Q8-Q11)

2.2.2 Those about faculty member’s belief of student writing (Q18-Q21)

2.2.3 Demographics: Q23-Q27

TTFac2 <- select(TTFac, c(19,20,21,22,32,33,34,35,37,38,39,40,41))       
View(TTFac2)

2.3 Make a jitterplot comparing TTFaculty answers about the effectiveness of the WACT course (Q18) to that of JINS (Q19), colored by School of respondent Q27

ggplot(data = TTFac2) + 
  geom_jitter(mapping = aes(x = WACTimprove, y = JINSImprove, color=School))

2.4 Create a new variable, WACTtoJINS, that calculates the ratio of a respondent’s answer to Q18 (about WACT writing) to that Q19 (about JINS writing).

TTFac2 <- mutate(TTFac, WACTtoJINS=as.numeric(WACTimprove)/as.numeric(JINSImprove))
View(TTFac2)

2.5 Make boxplots of your new variable, WACTtoJINS by school of respondent (Q27).

ggplot(data = TTFac2) +
  geom_boxplot(mapping = aes(x=School, y=WACTtoJINS))

3 Knit an RMarkdown file as an .html.