[Tex/LaTex] Using LuaLaTeX and knitr together

knitrluatexr

I would like to include R results in a LuaLaTeX document, which I prefer over XeLaTeX mainly because of the greater support of the package microtype.
Do you know whether and how is it possible?

Moreover, for more structured documents, I like to call the chapters' .tex files with the command \input in a master file, which is then compiled. Therefore, I would also like to know, in case you have a solution to the first problem, if it allows such tree structure.

I am especially interested in solutions that refer to Sweave files compilation.

Best Answer

There's an option to change the LaTeX engine with R Markdown:

https://rmarkdown.rstudio.com/pdf_document_format.html#latex_engine