css - Moving text to be to the left of plots in knitr bootstrap -


i using knitrbootstrap package within r produce reports. particular audience keep r code out of report echo=false , leaves pretty large amount of white space right of plots default layout.

how go editing layout such plot images right aligned , text write appears left of plots rather above?

you can use css property float: right make images float right, e.g.

```{r fig-a, out.extra='style="float: right"', echo=false} x <- rnorm(100) y <- 2*x + rnorm(100) par(mar = c(4, 4, .1, .1)) plot(x,y) ``` 

example output:

right align plots in r markdown


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -