I am working with a dataset that includes 150 individuals that each have 1-7 bloodsamples registered. Each blood sample is listed as a line, meaning that an ID will appear in multiple lines, if this person has multiple samples.
I need to make a new variable telling me the date of the first blood sample for each individual. Any suggestions? I have attached a picture to illustrate my point.
If I understand correctly then you would just replace samples with Bloodsample_overview and make sure the column names match what you have in your dataset. If you provide a reprex that could help determine the problem.