Question: Q 5 a: Now we will clean the variable that measures how often the respondent ate fruit per day or per week or per month.
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.
brfpart brfpart
mutate
FRTDAY casewhen
FRUIT ~
betweenFRUIT ~
betweenFRUIT ~ round
betweenFRUIT ~ round
FRUIT ~
FRUIT ~ NAreal
FRUIT ~ NAreal
TRUE ~ NAreal
before
asdata.frame
Label: How many times did you eat fruit?
Section Name: Fruits & Vegetables
Core Section Number:
Question Number:
Column:
Type of Variable: Num
SAS Variable Name: FRUIT
Question Prologue:
Question: Not including juices, how often did you eat fruit?
Value Value Label Frequency Percentage
Weighted
Percentage
Days
Weeks
Less than once a month
Month Year
Never
Dont knowNot sure
Refused
BLANK Not asked or Missing can u correct my code using my format in R not python. i dont know what to use to divide the week n month
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
