I am getting started with R markdown and I would like to create a new report having our company image logo.png
in the upper right corner of each page.
I
I've tried many solutions presented here and in other forums, none of which worked. I've finally came to a solution that worked for me.
---
title: 'Fancy Title Here'
author: "Diego"
date: "today"
output:
pdf_document:
toc: yes
header-includes:
- \usepackage{fancyhdr}
---
\addtolength{\headheight}{1.0cm} % make more space for the header
\pagestyle{fancyplain} % use fancy for all pages except chapter start
\rhead{\includegraphics[height=1.2cm]{C:/Path/to/logo/logo}} % right logo
\renewcommand{\headrulewidth}{0pt} % remove rule below header
I hope that helps someone the same way it helped me.