I am currently using a data set with a format similar to the following:
I need to create a new variable for each political party which tells me the number X-values greater than 3. What command or formula would be needed to achieve this?
I could of course do it by hand, but the size of the dataset means it would take a very long time.
Any help would be massively appreciated.
Thank you
Jonny
Party | X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | X9 |
Labour | 1.5 | 6.2 | 4.1 | 9.0 | 2.2 | 0.5 | 0.9 | 1.1 | 8.2 |
Liberal | 3.4 | 3.9 | 4.9 | 1.4 | 5.2 | 0.4 | 9.1 | 12.2 | 0.3 |
Conservative | 3.6 | 8.1 | 0.2 | 3.1 | 0.4 | 6.2 | 4.3 | 1.8 | 7.5 |
I could of course do it by hand, but the size of the dataset means it would take a very long time.
Any help would be massively appreciated.
Thank you
Jonny
Comment