Question: I need help for this one please. Thank you. --- title: Lab 2 July 4 2022 author: Harold Nelson date: July 4, 2022 output: word_document
I need help for this one please. Thank you.
--- title: "Lab 2 July 4 2022" author: "Harold Nelson" date: "July 4, 2022" output: word_document --- ## Instructions This lab uses the exploratory tools for one variable and for relationships, which you learned in modules one and two. The lab is based on daily weather observations from the Olympia Airport. Be sure to change the name of the author on line 3 above. You must submit your completed work as a knitted docx or pdf file. Be sure to make use of the code I supplied in "Doing Lab 2". ## Setup The first step is to bring some software from elsewhere in the general cloud to your RStudio cloud environment. The two lines of code below should be run just once before you knit your document. After you have done that, you can delete the two lines or just place the comment symbol, "#", at the beginning of each line. ```{r} install.packages("tidyverse") install.packages("gmodels") ``` The next step is to load the data and to verify that all of the required packages are installed and loaded. ## Data Download the R workspace OAW.Rdata from Canvas to your computer. Ignore any message from your computer that there is no app to use a file of this type. It will be in your donloads folder anyway. Then upload it from the downloads folder on your computer to the cloud. It contains a single dataframe, OAW. The first line of code in the following chunk will load it into your global environment. Look in the files tab in the lower right pane to make sure that the data file is there with the correct name. This won't work with files named OAW(1).Rdata or something similar. ```{r} load("/cloud/project/OAW.Rdata") library(tidyverse) library(gmodels) ``` ## Problem 1 Run the command str() on the dataframe OAW in the chunk below. Then answer the following questions. ```{r} # Place your code here. ``` Insert your answers following each question. 1. How many observations and variables are in this dataframe? 2. List the categorical variables. They can be identified from the str() output as "factor". 3. List the quantitative variables. ## Problem 2 Run the appropriate numerical and graphical commands on OAW$TMAX. ```{r} # Place your code here. ``` Make two correct statements about this variable. ## Problem 3 Run appropriate numerical and graphical commands on the variable OAW$PRCP. ```{r} #Place your code here ``` 1.Make two correct statements about this variable. 2. Looking at the histograms of this variable and TMAX, how would you decribe the difference in shape? ## Problem 4 Run appropriate numerical and graphical commands on the variable OAW$wetness. ```{r} # Place your code here. ``` Answer the following questions in the space provided. 1. What kind of variable is this? 2. Make two true statements about the distribution of its values. ## Problem 5 This question concerns the relationship between the variables mo and TMAX from the dataframe OAW. 1. What kinds of variables are these? Now run appropriate numerical and graphical commands to explore the relationship. Be sure to use the examples from "Doing Lab 2" for guidance. ```{r} # Place your code here. ``` 2. Which month is the hottest? Why did you pick this one over its nearest competitor? 3. Which month is coldest? Why did you pick this one over its nearest competitor? ## Problem 6 This question concerns the relationship between the variables mo and wetness from the dataframe OAW. 1. What kinds of variables are these? 2. Run appropriate numerical and graphical commands to explore this relationship. ```{r} library(gmodels) # Leave this here!!! # Place your code here. ``` 3. Which month has the largest fraction of really wet days? 4. Which month has the largest fraction of dry days? ## Problem 7 This question concerns the relationship between the variables yr and TMAX from the dataframe OAW. 1. What kinds of variables are these? 2. Run appropriate numerical and graphical commands to explore this relationship. Put yr in the role of the explanatory variable. 3. Is the graphical output readable? 4. What does the numerical result tell you? ```{r} # Place your code here. ``` ## Problem 8 This question concerns the relationship between the variables TMAX and TMIN from the dataframe OAW. 1. What kinds of variables are these? 2. Run appropriate numerical and graphical commands to explore this relationship. Put TMIN in the role of the explanatory variable. ```{r} # Place your code here. ``` 3. What can you say from the graphical output? 4. What does the numerical result tell you?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
