Dear R community - i've been using the tidyverse and cannot find a solution to the following. Here is my data....
|USUBJID|QSSTRESC|VISIT|
|PCM204-101-840-01-01|3|Screening Visit|
|PCM204-101-840-01-01|2|V4-Month 1|
|PCM204-101-840-01-01|1|V5-Month 3|
|PCM204-101-840-01-01|2|V6-Month 6|
|PCM204-101-840-01-01|1|V7-Month 12|
|PCM204-101-840-01-01|4|V8-Annual F/U - Year 2|
|PCM204-101-840-01-01|3|Screening Visit|
|PCM204-101-840-01-01|4|V4-Month 1|
|PCM204-101-840-01-01|2|V5-Month 3|
|PCM204-101-840-01-01|2|V6-Month 6|
|PCM204-101-840-01-01|3|V7-Month 12|
|PCM204-101-840-01-01|2|V8-Annual F/U - Year 2|
|PCM204-101-840-01-01|2|Screening Visit|
|PCM204-101-840-01-01|2|V4-Month 1|
|PCM204-101-840-01-01|1|V5-Month 3|
|PCM204-101-840-01-01|1|V6-Month 6|
|PCM204-101-840-01-01|1|V7-Month 12|
|PCM204-101-840-01-01|2|V8-Annual F/U - Year 2|
|PCM204-101-840-01-01|2|Screening Visit|
|PCM204-101-840-01-01|3|V4-Month 1|
|PCM204-101-840-01-01|3|V5-Month 3|
|PCM204-101-840-01-01|1|V6-Month 6|
|PCM204-101-840-01-01|2|V7-Month 12|
|PCM204-101-840-01-01|2|V8-Annual F/U - Year 2|
|PCM204-101-840-01-01|3|Screening Visit|
|PCM204-101-840-01-01|2|V4-Month 1|
|PCM204-101-840-01-01|1|V5-Month 3|
|PCM204-101-840-01-01|1|V6-Month 6|
|PCM204-101-840-01-01|2|V7-Month 12|
|PCM204-101-840-01-01|2|V8-Annual F/U - Year 2|
|PCM204-101-840-01-01|0|Screening Visit|
I simply need to list the score by visit... i.e. this:
Subject ID Visit Score
|PCM204-101-840-01-01|0|Screening Visit|
|PCM204-101-840-01-01|3|Screening Visit|
|PCM204-101-840-01-01|2|Screening Visit|
......
Is there a simple way to do this?