Using a new empty .rmd document, this code works:
![](RainbowDolphin.png)
\\begin{center}
\\includegraphics[width=4in]{RainbowDolphin.png}
\\end{center}
You may let Pandoc know that you have graphics in this document by specifying the YAML metadata:
---
graphics: yes
---
It's because the latex template doesn't load the graphicx package by default. You can do it manually by adding this to the yaml header:
---
title: "Untitled"
header-includes: \usepackage{graphicx}
output:
pdf_document:
keep_tex: true
---