在R Markdown中,如何在Distill网站中把多个Highcharter对象挨着对齐?我一直在尝试
---
title: "Untitled"
output: distill::distill_article
---
```{r, message = FALSE, echo = TRUE}
library(highcharter)
library(dplyr)
data(diamonds, economics_long, mpg, package = "ggplot2")
economics_long2 <- economics_long %>%
filter(variable %in% c("pop", "uempmed"))
economics_long3 <- economics_long %>%
filter(variable %in% c("pop", "unemploy"))
hw_grid(
hchart(economics_long2, "line", hcaes(x = date, y = value01, group = variable)),
hchart(economics_long3, "line", hcaes(x = date, y = value01, group = variable)),
ncol = 2
)
```
在标准的HTML输出中,即为 output: html_document
这个代码很好用。但是,对于Distill文章,两个highcharter对象不会挨着打印。
到目前为止,只是添加了 fig.show='hold'
你可能会有一些运气,在Rmarkdown中实现一些HTML的对齐方式,我试过使用 out.width="50%"
作为一个分块的说法,但没有运气