c=least_rfactor(Signal, Error, Model) minimal R-factor (weighted least square criteria) normalised to the Signal. the return value is a vector, and most optimizers use its sum (except LM). (|Signal-Model|/Error).^2/(Signal/Error).^2 A good fit corresponds with an R-factor lower than .2 <http://en.wikipedia.org/wiki/R-factor_%28crystallography%29> (c) E.Farhi, ILL. License: EUPL.