Spiro's R programs