Thanks, the exporting task is solved. Both ways quarto or rmarkdown works fine. But the loop challenge is still on.