5

Reproducible example below. I lose formatting on the table whenever I include a ggvis figure.

---
title: "test"
output: html_document
---

```{r setup, include=FALSE}
library(dplyr)
library(ggvis)
library(knitr)
```

The following table looks fine...

```{r echo=FALSE, results='asis'}
cars %>% kable(format = 'markdown')
```

As long as I don't include this plot below

```{r, echo=FALSE}
pressure %>%
  ggvis(x = ~temperature, y = ~pressure) %>%
  layer_bars()
```
4

1 回答 1

2

这可能与 ggvis 的开发版本中已修复的错误有关。如果您使用 安装最新版本devtools::install_github('rstudio/ggvis'),它应该可以工作。

于 2014-07-28T21:53:49.723 回答