Ich habe ein einfaches Beispiel von dem, was ich in einem langen Markdown-Skript gegenüberstehen reproduziert.2-Spalten-Format in Rmarkdown schlägt fehl nach opts_chunk
Ich möchte einige Plots auf Folien in 2 Spaltenformat und einige in 1 Spaltenformat angezeigt werden. Dementsprechend muss ich die Breite der Plots anpassen. Problem ist das 2-Spalten-Format scheint nicht zu funktionieren, wenn ich den resultierenden HTML-Code im Chrome-Browser öffne; Die Diagramme erscheinen untereinander.
Die Rmd (gespeichert "Präsentation" mit -> Standardausgabeformat "HTML ioslides") unter:
<style>
.col2 {
float:left;
}
</style>
Ihr 2 Stellplätze:
---
title: "Test"
author: "Gaurav Chaturvedi"
date: "6/29/2016"
output: ioslides_presentation
---
<style>
.col2 {
columns: 2 200px;
-webkit-columns: 2 200px;
-moz-columns: 2 200px;
}
</style>
## Slide with Plot
```{r, echo=FALSE}
suppressPackageStartupMessages(library(knitr))
boxplot(mpg~cyl, data=mtcars)
opts_chunk$set(comment=NA, fig.height = 4, fig.width = 4)
```
## 2 Plots
<div class = "col2">
```{r, echo=FALSE}
boxplot(mpg ~cyl, data=mtcars[mtcars$cyl==4,])
boxplot(mpg ~cyl, data=mtcars[mtcars$cyl==6,])
```
</div>
Ich habe die "float: links;" in der aktuellen