The MK4 & Mk5 R32's have the same blocks/head/cams, the difference is in the ECU, wiring loom, plugs, injectors, fuel rail etc.
I believe it is possible to use MK4 ecu/loom etc with a Mk5 block, but I'm not 100% about that.
Although it's possible I don't there is much point in it....power is pretty much the same for both engines, a lot of work for little gain.
The Mk6 R engine will be harder to fit and a damn sight more expensive, not got a clue what's involved in that tbh.