This is a practice an example of the data I am trying to expand over multiple columns in R
Location<-c(rep("ATL",3),rep("CLE",3),rep("BOS",3))
type<-rep(c("sedan","truck","coupe"),3)
pro1<-rep(c("0800 SC","1500 SC","0900 SC"),3)
pro2<- rep(c("0800 SC","1500 SC","0900 SC"),3)
pro3<-rep(c("1000 SC","1700 SC","1100 SC"),3)
pro4<-rep(c("1300 SC","1100 SC","2300 SC"),3)
x<-data.frame(Location,type,pro1,pro2,pro3,pro4)
I am trying to transfer the data into the screenshot of the excel file
Desired output (screenshot from Excel):
Current output: