Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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