I have the following line in a rmd-file and I can see the graphics when I knit a html-page.

But when I try to knit a PDF-document If will get the following error message:
! LaTeX Error: Unknown graphics extension: .svg.
I have installed the following packages
texlive-latex-extra
texlive-luatex
texlive-science
And I my settings for output are
output:
pdf_document:
latex_engine: lualatex