simple R programs ofr various tasks