This is my data and I want to arrange in ascendent order



I want to place in ascendent order the colum where only appears truck 1, truck 2,truck 3 ... but this will just be rearreange up to the line where it say shift , the nex set of colums will be same , I am trying to have the interactions of the different trucks per shift .

How will be the best way to do that?

in dplyr, the verb to sort dataframes is arrange().
you can look at the documentation by typing in your console
?arrange

the first two examples included there are

arrange(mtcars, cyl, disp)
arrange(mtcars, desc(disp))

showing how mtcars can be arrange by Number of cylinders and Displacement
and also how it can be arranged by descending order of Displacement