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

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

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.