0

I have some simple audit data for hospital wards. The data is structured with answers to a variety of questions as the text responses ‘fully’ ‘partial’ or ‘not compliant’.

I am trying to pivot this in r to show % compliance to each question by ward.

I am relatively new to R and have tried to melt and cast but I keep getting errors. Any help / suggestions would be grateful received.

MrFlick
  • 195,160
  • 17
  • 277
  • 295
  • Hey! Can you please provide us with data. `dput(yourDf)` for example could help- – Georgery Feb 13 '20 at 12:46
  • Thanks Gregory. Here is a snip of the df. I’m looking at achieving % compliance by ward and overall. I’ve only included one question however I imagine the process will remain the same for the others – Andy Ward Feb 13 '20 at 13:27
  • Your example got lost somewhere...you can [edit] the question to include it – camille Feb 13 '20 at 15:07
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Show the code you tried and list the errors you got. – MrFlick Feb 13 '20 at 15:51

0 Answers0