Relative Content

Tag Archive for r

Extract rows for the first week of data that meets criteria in R

I have longitudinal lab data where each person in a dataset has a line for every day they measured their A1C and uploaded it via an app. I need help identifying and extracting the first ‘valid’ week of data where the person uploaded their measurement on least 5 of 7 days in a given week. However, if they had data for 6 days or 7, I want to extract all possible measures for that week.