# Create a sample survey data frame
survey_df <- data.frame(
person_id = c(1, 2, 3, 4, 5, 6, 7),
question_concept_id = rep(40192529, 7),
answer_concept_id = c(40192435, 40192510, 40192405, 40192387,
903087, 903079, NA)
)
# Compute English proficiency categories
english_proficient_scores <- calc_english_proficient(survey_df)
head(english_proficient_scores)
Run the code above in your browser using DataLab