I have data in a long format that I need to selectively move to wide format.
Here is an example of what I have and what I need
Rating <- c("Overall","Overall_rank","Total","Total_rank")
value <- c(6,1,5,2)
example <- data.frame(Rating,value)
Creates data that looks like this:
Rating value
Overall 6
Overall_rank 1
Total 5
Total_rank 2
However, I want my data to look like:
I tried pivot_wider
, but cannot seem to get it.