I'm fairly new to R, but so far it's proved a wonderful tool. I've had great luck finding the answers on how to do various tasks online, but now I'm stuck. I've read various instructionals for hours and have gotten no closer to solving my problem. I feel like this is an easy question, but I just can't get it; so I apologize.
Here is what I need to do. Imagine I have data with patients who have had their blood pressure taken. I have a long format dataset for this. So for example.
Here is what I need:
I've tried all sorts of things with pivot_wider and group_by, but I've gotten nowhere.
I appreciate any help. Thanks SO much,