Ion beam analysis of rare earth nitride thin films