How to put two logos on the same line as the title, one on the right corner and another on the left corner in R Markdown?

I tried a lot of things, but I coundn't get what I want.
I expect something like THE FIRST image, but Iam getting THE SECOND:

Here is my code in R markdown
report.rmd


---
title: "SOME TITLE"
params:
 set_subtitle: test
subtitle:"`r params$set_subtitle`"
date: '`r format(Sys.Date(), "%B %d, %Y")`'

output: pdf_document
header-includes:
    - \usepackage{fancyhdr}
---
\addtolength{\headheight}{1.0cm} 
\pagestyle{fancyplain} 
\lhead{\includegraphics[height=1.2cm]{1.png}} 
\rhead{\includegraphics[height=1.2cm]{1.png}} 
\renewcommand{\headrulewidth}{0pt} 

How to get the result I want?

I think the reason you're getting error is due to the following line:

Try to add a space after the :.

The following works on my device:

---
title: "some title"
params:
 set_subtitle: test
subtitle: "`r params$set_subtitle`"
date: '`r format(Sys.Date(), "%B %d, %Y")`'

output: pdf_document
header-includes:
    - \usepackage{fancyhdr}
---
\addtolength{\headheight}{1.0cm} 
\pagestyle{fancyplain} 
\lhead{\includegraphics[height=1.2cm]{1.png}} 
\rhead{\includegraphics[height=1.2cm]{1.png}} 
\renewcommand{\headrulewidth}{0pt}

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.