I have the following data frame:

```
df <- structure(list(condition = c("renal", "cardiac", "cardiac", "cardiac", 
"cardiac", "infection", "infection", "movement_immobility", "hyper_hypo", 
"cardiac", "infection", "renal", "cardiac", "renal", "renal", 
"hyper_hypo", "hyper_hypo", "infection", "movement_immobility", 
"hyper_hypo"), value = c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, 
TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, 
FALSE, FALSE, FALSE, TRUE), n = c(76570L, 48959L, 46816L, 46816L, 
46816L, 72007L, 23768L, 77433L, 62195L, 48959L, 23768L, 76570L, 
46816L, 76570L, 76570L, 62195L, 62195L, 72007L, 77433L, 33580L
), P = c(0.799477943095797, 0.511187679457061, 0.488812320542939, 
0.488812320542939, 0.488812320542939, 0.751835030018272, 0.248164969981728, 
0.808488645262334, 0.649386583137562, 0.511187679457061, 0.248164969981728, 
0.799477943095797, 0.488812320542939, 0.799477943095797, 0.799477943095797, 
0.649386583137562, 0.649386583137562, 0.751835030018272, 0.808488645262334, 
0.350613416862438)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, 
-20L))

```

True + False from each condition sum up to 1. I would like to order the 5 condition groups by the percentage of positives, such that "cardiac", with 48.9% positives will get the value 1, and so on. So on the one hand I am ignoring the negatives for the calculation but on the other hand assigning the value 1 to them, too.

How can I achieve this with dplyr?