I would like to show, in an rmarkdown document, the printed output of a tibble as shown in the console. i.e.
- First line: dimension summary;
- then the column headers;
- then classes of variables;
- then first 10 lines of the tibble;
- then number of rows not shown.
However, by default, tibbles and other data.frame objects are automatically converted to a tabbed, paginated table showing all contents.
I note that the option to turn off this default behaviour can be set for a whole markdown document by changing the df_print
option to tibble
in the YAML.
However, how do I set the df_print
option to tibble
for just a single R code chunk, so that I can show in an Rmarkdown document what the user will see on the console?
Thanks, Jon