Question: 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.
### Q5a: 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 `brf_part1` named `FRTDAY` that converts all of the responses into fruits eaten *per day*. Be sure to account for 0 days. Use 30 days per month, 7 days per week, and 0.02 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 `brf_part1` dataframe.
The resulting dataframe should still have NAs for FRTDAY at this point.
Hint: The resulting dataframe is 431,750 x 4.
```{r}
Q5a
```
### Q5b: Update the `FRTDAY` column in the dataframe `brf_part1` by removing the respondents who said "don't know/not sure" or refused to respond. Drop the original fruit variable from the `brf_part1` dataframe (but keep FRTDAY). Store the first 10 rows of the dataframe as `Q5.`
Hint: The resulting dataframe is 422,747 x 3. 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 Q5 #
### TYPE YOUR CODE BELOW ###
### VIEW OUTPUT ###
Q5
```

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 Databases Questions!