To help people who want to try it, here are a typical CSV file, its Libre Office version with comments, translated from the French version (sorry for all mistakes in English inside).
The R script to do the conversion into XML would be
library( SARP.moodle )
csv.moodle( "types_questions.en.2020-04-19_EC.csv" )
assuming the file in in R working directory (use csv.moodle( file.choose() ) to use a file selector to select the file, if needed)
Hope this will help...