learning and tests with R