I would like to insert a png "logo.png" inside my rMarkdown report. The current solution is working only when the png is in the root directory of the html report. However, when I send the report to someone, the missing png is an issue, since the person has only the html without the accompanied logo.
My idea is to read and to save the png beforehand and then to insert this r object in the html code chunk. However, I am having issues with this approach. Any help or other ideas are very much appreciated!
<script>
$(document).ready(function() {
$head = $('#header');
$head.prepend('<img src=\"logo.png\" style=\"float: right; width: 300px; padding-top: 20px; padding-left: 35px\"/>')
});
</script>