0

The output from the knitted HTML from R markdown does show the paged table but does not on github when I preview it through htmlpreview.github.io.

Something I noticed was that the .html code was different when opened through chrome and vs. The vs code matches the inspect elements on github

Code from R markdown (``` changed to ``'):

---
output:
  html_document:
    df_print: paged
editor_options:
  chunk_output_type: inline
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
``'

```{r }
library(rmarkdown)
paged_table(Apr22, options = list(max.print = 5))
```

Local Chrome Inspect

Online Github Inspect

Kat
  • 7,611
  • 2
  • 12
  • 34
subj3ct
  • 1
  • 1
  • Is `Apr22` an object? If it is an object in your environment, that works when not knitting. However, the object needs to be brought into the file if you knit. If the content is brought into your RMD file, but you didn't show that part, can you share the object? Assuming it's a data frame (as that's what `paged_table` supports, you can use `dput(Apr22)`. If it's a huge table, you can use `dput(head(Apr22, 20))` or something along those lines. Check it out: [making R reproducible questions](https://stackoverflow.com/q/5963269). – Kat May 17 '22 at 14:11

0 Answers0