setting figure size in Rmd file

I was playing around with Rmd code chunk settings. I wanted to have a code chunk inside my Rmd file that set a figure size for a portion of my codes (that is why I don't put it in YAML header). I do not knit the file, just looking at the inline image previews

```{r }
# set image dimensions
fig.width=5
fig.hight=5
units="in"

and then to apply it I want smth like this
plot(pressure)

but this does not produce desired outcome, while specifying numbers directly inside the code works:


```{r fig.height=17, fig.width=12, units=units}
    plot(pressure)

I wonder why it is not recognized, when the value is supplied from the variable, iItried: {r fig.height=r fig.hight} but that also did not work.

This topic was automatically closed 90 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.