As @joran mentioned in the comments, \SweaveOpts{concordance=TRUE}
is not supposed to be there. If RStudio insists on adding it to your document, I'm highly skeptical about your RStudio settings -- it seems you are using Sweave instead of knitr
to compile this document (in that case, RStudio does add this if you have checked the concordance option). Go to Tools -> Options -> Sweave
, and see if you have changed the default Sweave
option to knitr
.
Sweave sets the figure width to .8\textwidth
globally by default, and that might explain the problem you saw.
Also note echo=False, fig=true
are not valid knitr
chunk options. You need to use TRUE/FALSE
. For out.width
, you'd better give it an explicit unit such as in
or cm
.