A rough idle can be caused by half a million things. That's why the car was built with an on board diagnostic system. (Your check engine light.)
It could be your distributor cap, rotor, spark, plugs, wires, vacuum lines, IACV, FITV... The list goes on, but if the car is throwing an EGR code-...