5

I don't think I understand how table rendering works inline in R Notebooks, and how kable output is formatted inline as well.

I'd just like to be able to see dataframes in my notebook's inline output the way they appear when previewing the notebook / knitting the file.

What the table looks like in Notebook Preview: enter image description here

I've tried turning off the paged print option, but still get it as seen below:

```{r results='asis', rmarkdown.df_print = FALSE}

ssc.sample.convert %>% tabyl(Role) %>% as.data.frame()
```

enter image description here

When attempting to use kable, I can't seem to get the output to look like it does in the rendered HTML file:

```{r results='asis', rmarkdown.df_print = FALSE}


ssc.sample.convert %>% tabyl(Role) %>% kable(format="html")
```

enter image description here

Is it possible to get rid of the paged print somehow? Is it possible to view the final output of kable tables inline?

Carmen Sandoval
  • 2,266
  • 5
  • 30
  • 46

0 Answers0