I have a dataset of repeated measurements (hb) for patients (record_id) over several days. I have included an example below
record_id Day hb
1 0 122
1 1 90
1 2 71
1 3 71
2 0 139
2 1 130
2 2 119
2 3 106
3 0 89
3 1 126
3 2 127
3 3 110
4 0 90
4 1 86
4 2 82
4 3 78
5 0 118
5 1 108
5 2 95
5 3 94
I wish to find out the minimum value for "hb" for each patient:
#nadir Hb by patient
x1 <- aggregate(hb~record_id, data=df, FUN=function(df) c(min=min(df), count=length(df)))
summary(x1)
Would anyone be kind enough to show me how I could plot a histogram of these minimum values? Thank you very much for your time, Annemarie