I am relatively new to R and I could not find anything online for what I intend to do with my dataframe. The situation is the following:
I have multiple rows with the same Facility Name. Each facility reports different chemicals with different emissions. So for example, if facility x emits 3 chemicals I would have 3 rows with facility x, where row 1 specificies facility x's output for chemical a, row 2 specificies facility x's output for chemical b, and row 3 specificies facility x's output for chemical c.
Facility y for example emits 2 chemicals so I would have 2 rows with facility y, where row 4 specifies facility y's output for chemical a, and row 5 specifies facility y's output for chemical b.
Now i would like to reorder the dataframe so that I have every facility only once as a row, and for every chemical the facility reports an additional column.
I hope it is clear, and i would be very happy to get help on this issue. kind regards, Franziska