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()
```
kevinykuo
  • 4,600
  • 5
  • 23
  • 31
  • for what it's worth, I was able to "fix" this by changing the `kable` call to be `kable(format = "html", table.attr = 'class=\"table table=striped table-hover \"')` – kevinykuo Jul 25 '14 at 15:24

1 Answers1

2

This is probably related to a bug that has been fixed in the development version of ggvis. If you install the latest with devtools::install_github('rstudio/ggvis'), it should work.

wch
  • 4,069
  • 2
  • 28
  • 36