R programs for Scfes