data reshape

38 views
Skip to first unread message

Fritsander

unread,
Sep 7, 2016, 5:21:23 PM9/7/16
to manipulatr
Hi,

I face a rather challenging problem I think. 

I've tried to reshape the data from sheet "Opstelling" in the attached file by importing it into R (ref R-script also enclosed), melting it (reshape2) and dcasting it to arrive at the date as shown on sheet "Opstelling per positie". Here you see per position, i.e. RV the persons that have this position as first preference, in this case P1. P2 is their second preference and so on.

However, I can't get there. The result you see in the attachment has been created by hand.

What do I have to add to my script to be able to get the result as shown on sheet "Opstelling per positie".

Thanks a lot.

Kin regards,

Fritsander
Lineup.xlsx
Opstelling.R
Reply all
Reply to author
Forward
0 new messages