Code
library(tidyverse)
::opts_chunk$set(echo = TRUE, warning=FALSE, message=FALSE) knitr
Yakub Rabiutheen
August 18, 2022
Today’s challenge is to:
Read in one (or more) of the following datasets, using the correct R package and command.
Column Names
This Data is already tidy, perhaps I will compare data about education and Political Identification.
It is also interesting to note that there seems to be a high frequency of working full-time and having a Bachelors degree.
Error in table(abc_poll_2021$ppeducat, abc_poll_2021$ppemploy): object 'abc_poll_2021' not found
Cleaned Up Party id similar to how Meredith did it. Removed all Skipped answers and Removed the An.
Error in mutate(., partyid = str_remove(QPID, "A[n]* "), partyid = na_if(partyid, : object 'abc_poll_2011' not found
Error in table(abc_poll_2021$QID): object 'abc_poll_2021' not found
Table below demonstrates the general trend that Democrats are more likely to have a Bachelor’s Degree or Higher
Error in table(abc_poll_2021$partyid, abc_poll_2021$ppeducat): object 'abc_poll_2021' not found
:::{#quarto-navigation-envelope .hidden}
[Challenge 4 Instructions]{.hidden render-id="quarto-int-sidebar-title"}
[Challenge 4 Instructions]{.hidden render-id="quarto-int-navbar-title"}
[August 2022 Posts]{.hidden render-id="quarto-int-navbar:August 2022 Posts"}
[Featured Posts]{.hidden render-id="quarto-int-navbar:Featured Posts"}
[Contributors]{.hidden render-id="quarto-int-navbar:Contributors"}
[DACSS]{.hidden render-id="quarto-int-navbar:DACSS"}
:::
:::{#quarto-meta-markdown .hidden}
[ - Challenge 4 Instructions]{.hidden render-id="quarto-metatitle"}
:::
<!-- -->
::: {.quarto-embedded-source-code}
```````````````````{.markdown shortcodes="false"}
---
title: "Challenge 4 Instructions"
author: "Yakub Rabiutheen"
desription: "More data wrangling: pivoting"
date: "08/18/2022"
format:
html:
toc: true
code-fold: true
code-copy: true
code-tools: true
categories:
- challenge_4
---
quarto-executable-code-5450563D
```r
#| label: setup
#| warning: false
#| message: false
library(tidyverse)
knitr::opts_chunk$set(echo = TRUE, warning=FALSE, message=FALSE)
Today’s challenge is to:
Read in one (or more) of the following datasets, using the correct R package and command.
Column Names
quarto-executable-code-5450563D
This Data is already tidy, perhaps I will compare data about education and Political Identification.
It is also interesting to note that there seems to be a high frequency of working full-time and having a Bachelors degree.
quarto-executable-code-5450563D
Cleaned Up Party id similar to how Meredith did it. Removed all Skipped answers and Removed the An.
quarto-executable-code-5450563D
abc_poll_2021<-abc_poll_2011%>%
mutate(partyid = str_remove(QPID, "A[n]* "),
partyid = na_if(partyid, "Skipped"))%>%
select(-QPID)
table(abc_poll_2021$QID)
Table below demonstrates the general trend that Democrats are more likely to have a Bachelor’s Degree or Higher
quarto-executable-code-5450563D
:::