Electronic and magnetic properties of rare-earth-transition-metal glasses