2

I am new to R Markdown and I am trying to generate a pdf report for my class. I have a small figure that I do not want taking up so many lines and surrounded by white space, so I'd like to wrap text around it. It can be aligned left or right, it doesn't matter.

I have tried a solution I found here, but

{r plot, out.width="4in", out.extra='style="float:right; padding:10px"',  echo=F}
knitr::include_graphics("myplot.png")

throws the following error:

"! Package keyval Error: style undefined."

and the document won't compile. I have searched high and low and can't find a solution anywhere.

Kari
  • 21
  • 2
  • What you found is for HTML output. For PDF output via LaTeX have a look here: https://stackoverflow.com/a/54112408/8416610 – Ralf Stubner Oct 21 '19 at 14:10

0 Answers0