I have a very large table with data and it looks like below:
Name Type U1 U2 U3
1 A Max 0 543 0
2 A Min -324 0 -876
3 B Max 4536 0 0
4 B Min 0 -56 -96
5 C Max 0 543 0
6 C Min -32 0 -426
7 D Max 4612 0 0
8 D Min 0 -456 -86
For each Name (A,B,C,D) there are two values per column, one for max and one for min. Between the two one will always be zero. Either the max is zero and the min is negative or the min is zero and the max is positive. I would like to create a subset of the data.frame in which I can combine the rows corresponding to the same Name (A,B,C,D) and remove the cells that equal to zero.
I was not sure what would be the best way around this. Any guidance in appreciated!