Grouping variables

I have a data set that I would like to do some r statistical modelling on. The machine that I am using has 40 pallets, each with 8 positions. Each pallet cycles through the machine and checks are done at two stations with the results recorded. Each Station has 10 positions as well. I want to be able to group together the Pallet ID and the Pallet position ID's, but am unsure how to achieve this. Below is a representation of the data from Pallet 1, but this will be similar across all 40 pallets

Pallet  Position    Station Result  
1   1   101 0.234   1st Cycle
1   2   205 0.3244  1st Cycle
1   3   102 0.1123  1st Cycle
1   4   206 0.4321  1st Cycle
1   5   103 0.5688  1st Cycle
1   6   207 0.6554  1st Cycle
1   7   104 0.9988  1st Cycle
1   8   208 0.4354  1st Cycle
1   1   107 0.55    2nd Cycle
1   2   201 0.5356  2nd Cycle
1   3   108 0.2245  2nd Cycle
1   4   202 0.0994  2nd Cycle
1   5   109 0.0333  2nd Cycle
1   6   203 0.429   2nd Cycle
1   7   110 0.32333 2nd Cycle
1   8   204 0.33    3rd Cycle
1   1   103 0.32444 3rd Cycle
1   2   207 0.555   3rd Cycle
1   3   104 0.9870987   3rd Cycle
1   4   208 0.555   3rd Cycle
1   5   105 0.346   3rd Cycle
1   6   209 0.234   3rd Cycle
1   7   106 0.689   3rd Cycle
1   8   210 0.0944  3rd Cycle

So I would like to do some time series with them. By being able to group together as follows

Pallet 1 Position 1 station 101 against result

But I need to get all pallets and all pallet positions against the stations and then compare the results to see if the results are above or below certain values. i.e. below 0.25 is a fail or above 0.75 is a fail, but any result between these is a pass

Here is a resource you can learn from to become familiar with data transformations, and in particular summarisations over groupings
5 Data transformation | R for Data Science (had.co.nz)

2 Likes

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.