0

I try to document my R package with a vignette and want to print dataframes paged.

It works with

---
title: "Helpfile"
output: 
  rmarkdown::html_document:
    df_print: paged
---

```{r setup}
iris
```

but not with

---
title: "Helpfile"
output: 
  rmarkdown::html_vignette:
    df_print: paged

vignette: >
  %\VignetteIndexEntry{Helpfile}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r setup}
iris
```

The help (https://pkgs.rstudio.com/rmarkdown/reference/html_vignette.html) says that I can use df_paged the same way as in html_document. What do I get wrong here?

2
  • 1
    Seems like this should solve your issue a.k.a. use DT::datatable(iris) since html_vignette seems too light weight to handle printing. Commented Mar 23 at 22:28
  • 1
    I don't really know why, but adding this paged_print function and using render=paged_print as described here works too. Commented Mar 23 at 22:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.