R is a language and environment for statistical computing and graphics which is becoming one of the most popular and used tools for data analysis because of its power and its character of free software. Many universities are adopting R as the recommended software for teaching (and learning) statistics. One of the biggest advantages of R is the possibility of developing new libraries with an unlimited range of applications.

Modern teaching-learning environments require teachers to carry out a continuous monitoring of the level of learning achieved by students. This task is difficult to accomplish, particularly when the number of students enrolled results in a great effort of preparing and assessing learning tests.
Currently two R libraries, exams and RGIFT, have been designed for automatic generation of exams, quizzes and assessments on the subject of Statistics and Mathematics. These libraries allow the teacher to write templates for exercises which depend on some parameters that determine the (random) generation of questions or the values on which these questions are based.

We have developed a new library, which we have called “auggexer” (AUtomatic Generation and Grading of EXErcises in R) which adds the possibility not only of automatically generate exercises but also of automatically grading them. By using a bank of exercises templates the library is capable of generating and grading an individualized list of problems for each student. These problems could be the same for all students (but with different figures for each one), or could all be different. The problems can contain numeric or multiple response questions. In the current version of the library the exercise list is presented to the student as a pdf form. In our experiences (at the University of Las Palmas de Gran Canaria, Spain), these forms are made available to the students through Moodle; the student download the form, fill it with the computer (in the classroom or at home), and upload it. Once the forms have been all uploaded, the teacher launches the automatic correction process and the grades earned are published.

In this way, the teacher can deal with a large number of students, at the same time that a continuous assessment of them during their learning process can be afforded. This tool can be used for evaluation purposes as well as a medium for the student to test the acquired knowledge or abilities.

A significant effort has been made in order to ease the difficulties inherent to the development of the exercises templates. To this aim, we have implemented some utilities that allow for the use of the R markdown syntax, an authoring format that enables easy creation of dynamic documents containing R code. In any case it is unavoidable that the teacher must have some fluency with R.

In the last academic year we have tested our library on two fronts. On the one hand with teachers, checking if they were able to generate the exercises templates and create the forms to be filled by students. And on the other hand with students, reviewing their interest and performance with this system.

At present, although there are still some aspects to be improved, we believe that our library can provide teachers and students a valuable tool with significant impact in the teaching-learning process.