Created
March 8, 2017 19:24
-
-
Save ryanburge/4e78842310b2c402ed46ae27c2dd83c3 to your computer and use it in GitHub Desktop.
First Coding Assignment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This is due on 3/17 in the Dropbox on D2L | |
## Use Rmarkdown to complete this assignment | |
## Please upload the .html file | |
Refer to the following Rmarkdown file for a template: https://gist.github.com/ryanburge/1bce7a48995cbf82995668c5c3e18d2c | |
1. What is the code that you would use to give me a frequency table for the following question: | |
“Do you favor or oppose cuts in state spending on state universities?” | |
What is the code that you would use to make a histogram of that question? | |
How would you describe the results of this question? | |
2. Using the same variable that was the focus of Question 1, do the following: | |
Create a new variable called highered and then recode that variable to where “Other/Don’t Know” is zero | |
What’s the code for doing those two things? | |
Now, I want you to create a dataset of just African-Americans. | |
What’s the code you used for doing that? | |
Finally, make a histogram of that African-American dataset using the “highered” variable you created earlier. What’s the code for that? | |
What does this histogram tell you? | |
3. I want you to make a series of crosstabs using the “party_aff” variable and the following questions on the Simon poll: | |
cuts_he, cuts_cops, cuts_parks, cuts_poor, cuts_dis, pen_cuts | |
What is the code that you used? | |
What results do you find? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment