May be quite basic as I am new to R but I am struggling to get my data into the right format in order to use the mlogit function, tried both the tidyr and reshape2 packages and neither seems to be working.
Essentially my data is the below format
current format - just an example currently on the road
and would like it to be in the below format
typically I would just do this on excel before reading into R but in the spirit of pushing my r skills (and its quite a big dataset) I am trying to do this in R
Have read through other posts and they don't seem to work, (this isn't associated with time series data), particularly causing issues with the true/False statements, need the data set to be wider and longer
Any help would be greatly appreciated