I'm using Rstudio and i am not very familiar using it. I am not sure how i am suppose to code this to place it in the chunk to get results.
Let's think of calendar year 2016 as a sample of all the days in olywthr. First create a dataframe, cal2016, containing only days in 2016 from the larger dataframe olywthr (I have supplied the R code to do this in the following chunk). Run str() and summary() on the new dataframe to make sure your extraction worked correctly. Cite at least one result from these two commands that gives you confidence.
Since you have not provided the data, I am providing you an example of this data so that you can do it on your own easily.
After reading the data you have to write the command:
cal2016 = olywthr[olywthr$yr == 2016]
Note: “==” is a double equal sign
Now to make sure that your extraction is correct you have to write the commands:
str(cal2016)
summary(cal2016)
These commands must give the structure and summary for the year 2016 data only.
Copy the structure and summary to present it to your professor.
If you stuck anywhere you can comment here and if you can provide the data that will be great.
Get Answers For Free
Most questions answered within 1 hours.