If I output a data.frame in RMarkdown, the resulting HTML will only show 10 rows at a time.
How do I keep the nice formatting but show all rows?
For example if I want to output all rows of mtcars:

You can achieve this by setting the options pageLength of DT: Example rmd:
---
title: "Untitled"
author: "TarJae"
date: "5 2 2021"
output: html_document
---
chunk 1
knitr::opts_chunk$set(echo = TRUE)
library(DT)
options(DT.options = list(pageLength = 100, language = list(search = 'Filter:')))
chunk 2:
datatable(mtcars)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With