Getting Started with Data Frames in RStudio
When running the made-up data for the 2016 elections, I get the following error: " Error : unexpected input in "Name <- c("Jeb", “". After fixing the quotations we get another error: Error : unexpected symbol in "ABC political". After some troubleshooting, adding a comma that was missing, and fixing the names, I replaced the spaces with underscores. We have the following working code. Name <- c("Jeb", "Donald", "Ted", "Marco", "Carly", "Hillary", "Bernie") ABC_political_poll_results <- c( 4, 62, 51, 21, 2, 14, 15) CBS_political_poll_results <- c(12, 75, 43, 19, 1, 21, 19) We can create a data frame to make visualizing the data easier using the following code. polls_df <- data.frame( Name, ABC = ABC_political_poll_results, CBS = CBS_political_poll_results ) polls_df We use the data. frame function to create a data frame with the given data sets, and then we call...