sample programs for r