Question: ### Q5: Now we will clean the variable that measures how often the respondent ate fruit per day or per week or per month. Create

### Q5: 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 dataframe named `brf_Q5` based on `brf_Q2` with a new column named `FRTDAY` that converts all of the responses into fruits eaten *per day*. Place the new column as the first column in the dataframe. Be sure to account for 0 days. Use 30 days per month and 7 days per week in your conversion calculations and use 0.02 for the value that represents "less than once a month". - Remove the respondents who said "don't know/not sure" or refused to respond. - Drop the original fruit variable from the `brf_Q5` dataframe (but keep FRTDAY). - Be sure to round any conversion calculations to two decimal places. - FRTDAY should still contain "Not asked or Missing" values. We will handle those responses later. - Sort `brf_Q5` by the general health variable (from excellent health to poor health) and assign the first 10 rows to `Q5`. - Select values for rows 3, 65, 114, 120, 365 are shown below. ``` FRTDAY [name] [name] 3 2.00 2 1 65 NA 2 1 114 0.43 1 1 120 0.13 2 1 365 1.00 1 1 ``` ```{r} ### Do not edit the following line. It is used by CodeGrade. # CG Q5 # ### TYPE YOUR CODE BELOW ###

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!