Get Answer: Using Dplyr Will Question Guide
This type of question evaluates analytical and critical thinking skills.
What This Question Is About
This question relates to using dplyr will and requires a structured academic response.
How to Approach This Question
Use appropriate theories and support your answer with clear reasoning.
Key Explanation
This topic involves using dplyr will. A strong answer should include explanation, application, and examples.
Original Question
using r and dplyr We will be analyzing three variables (described below) in part 1 of this project. Identify the names of the variables indicated below using the CodeBook provided on Brightspace. Using the brfss2021.csv data provided on Brightspace, create a dataframe named `brf_Q1` with only three columns (in the order listed below). Do not rename the variables. Store the first 10 rows in `Q1`. – a variable that measures how often the respondent eats fruit (not including juices). – a variable that records the length of time since last routine medical checkup – a variable that records the general health of the respondent. We encourage you to explore both the Codebook and the Questionna ire on Brightspace and take note of the values of each of these three variables and familiarize yourself with them before continuing. Note: Your `brf_Q1` dataframe should have the same number of rows as the original `brf` but now only 3 columns. Below are the corresponding column names, and their values per position. FRUIT2 >= 101 & FRUIT2 <= 199 ~ "Days", FRUIT2 >= 201 & FRUIT2 >= 299 ~ “Weeks”, FRUIT2 %in% 300 ~ “Less than once a month”, FRUIT2 %in% c(12, 1, 2) ~ “Month/Year”, FRUIT2 %in% 555 ~ “Never”, FRUIT2 %in% 777 ~ “Don’t Know/Not sure”, FRUIT2 %in% 999 ~ “Refused”, FRUIT2 %in% ‘BLANK’ ~ “Not asked or Missing” CHECKUP1 %in% 1 ~ “Within past year”, CHECKUP1 %in% 2 ~ “Within past 2 years”, CHECKUP1 %in% 3 ~ “Within past 5 years”, CHECKUP1 %in% 4 ~ “5 or more years ago”, CHECKUP1 %in% 7 ~ “Don’t know/Not sure”, CHECKUP1 %in% 8 ~ “Never”, CHECKUP1 %in% 9 ~ “Refused”, CHECKUP1 %in% ‘BLANK’ ~ “Not asked or Missing” GENHLTH %in% 1 ~ “Excellent”, GENHLTH %in% 2 ~ “Very good”, GENHLTH %in% 3 ~ “Good”, GENHLTH %in% 4 ~ “Fair”, GENHLTH %in% 5 ~ “Poor”, GENHLTH %in% 7 ~ “Don’t Know/Not sure”, GENHLTH %in% 9 ~ “Refused”, GENHLTH %in% ‘BLANK’ ~ “Not asked or Missing” the amount of rows will be 438,693 The next step is to clean the data Clean the dataframe `brf_Q1` by removing the respondents who “refused”, said “don’t know/not sure” and any NAs from both the health variable GENHLTH and the length of time variable CHECKUP1. See the CodeBook for details on what the values of the variables mean. Store this cleaned version in a new dataframe named `brf_Q2` (we’ll use this later). Sort `brf_Q2` by the general health variable (from excellent health to poor health) and assign the first 10 rows to `Q2`. Hint: The resulting `brf_Q2` dataframe is 431,750 x 3.
******CLICK ORDER NOW BELOW AND OUR WRITERS WILL WRITE AN ANSWER TO THIS ASSIGNMENT OR ANY OTHER ASSIGNMENT, DISCUSSION, ESSAY, HOMEWORK OR QUESTION YOU MAY HAVE. OUR PAPERS ARE PLAGIARISM FREE*******."