Rare-earth metal adsorption on silicon: Variation of the work function