Look into the manual chapters about the "advise" functions and the "R" interface.