I have a data frame that has a row type that has A,B,C in repeated ways and they belong to different values an example below
Type Value Volume brand
A 1 5 E
B 2 1 $
C 3 1 5
C 2 1 2
C 4 5 7
B 2 1 E
A 3 3 $
The outcome I am searching for is to produce a CSV for A B and C
A.csv =
Type Value Volume Brand
A 1 5 E
A 3 3 $
B.csv =
Type Value Volume Brand
B 2 1 $
B 2 1 E
C.csv =
Type Value Volume Brand
C 3 1 5
C 2 1 2
C 4 5 7
I know how to do this individually but I would like to learn a way to do this for all of them together like with a for because I have a data frame with 32 different types and doing them individually is not cost effficient so any help would be very valuable.