Update functions2.R

changed findlambda and excoeff: findlambda returns only the global minimum