Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Continue with Data, in R . ### Q 5 a: Now we will clean the variable that measures how often the respondent ate fruit per
Continue with Data, in R
### Qa: Now we will clean the variable that measures how often the respondent ate fruit per day or per week or per month. Create a new variable in brfpart named FRTDAY that converts all of the responses into fruits eaten per day Be sure to account for days. Use days per month, days per week, and for less than once a month in your conversion calculations. Place the new column as the first column in the dataframe.
Make sure you added the new column FRTDAY to the existing brfpart dataframe.
The resulting dataframe should still have NAs for FRTDAY at this point.
Hint: The resulting dataframe is x
r
Qa
### Qb: Update the FRTDAY column in the dataframe brfpart by removing the respondents who said "don't knownot sure" or refused to respond. Drop the original fruit variable from the brfpart dataframe but keep FRTDAY Store the first rows of the dataframe as Q
Hint: The resulting dataframe is x Be sure the variables are in this order left to right: FRTDAY, the length of time variable, then the general health variable.
r
### Do not edit the following line. It is used by CodeGrade.
# CG Q #
### TYPE YOUR CODE BELOW ###
### VIEW OUTPUT ###
Q
My brfpart has the following columns;
FRUIT
CHECKUP
GENHLTH
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started