Module #3 Data.frame Assignment
- This week's module goes over creating data frames to further analyze a dataset. For this assignment, we are provided with a fictional data set covering the 2016 presidential election and polling results.
> Name <- c("Jeb", “Donald”, "Ted”, “Marco” “Carly”, “Hillary”, “Berine”)
> ABC political poll results <- c(4, 62 51, 21, 2, 14, 15)
> CBS political poll results <- c(12, 75, 43, 19, 1, 21, 19)
- Running this data in RStudio and creating a data frame from it gives us a visual to quickly see how the data is distributed.
Name ABC_political_poll_results CBS_political_poll_results
Jeb 4 12
Donald 62 75
Ted 51 43
Marco 21 19
Carly 2 1
Hillary 14 21
Berine 15 19
- From the data we can make several observations, firstly that Donald has the highest poll results in both ABC and CBS polls, second is that Carly has the lowest poll result in both polls, and lastly that the ABC and CBS poll results for each candidate were actually relatively close.

R code written for this assignment.
Comments
Post a Comment