Skip to content

Commit 1bd066c

Browse files
knitr table style specification in viz/clsfn1
1 parent d5a8c24 commit 1bd066c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/classification1.Rmd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ library(ggplot2)
1010
1111
knitr::opts_chunk$set(echo = TRUE,
1212
fig.align = "center")
13-
options(knitr.table.format = function() {
14-
if (knitr::is_latex_output()) 'latex' else 'pandoc'
15-
})
13+
options(knitr.table.format = ifelse(knitr::is_latex_output(), 'latex', 'html'))
1614
1715
cleanup_and_print <- function(output){
1816
for (i in seq_along(output)) {

source/viz.Rmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ library(magick)
99
1010
1111
knitr::opts_chunk$set(fig.align = "center")
12+
13+
options(knitr.table.format = ifelse(knitr::is_latex_output(), "latex", "html"))
1214
```
1315

1416
## Overview
@@ -1491,7 +1493,7 @@ file_sizes <- tibble(`Image type` = c("Raster",
14911493
/ 1000000, 2), "MB"),
14921494
paste(round(file.info("img/viz/faithful_plot.svg")["size"]
14931495
/ 1000000, 2), "MB")))
1494-
kable(file_sizes,
1496+
kable(file_sizes, booktabs = TRUE,
14951497
caption = "File sizes of the scatter plot of the Old Faithful data set when saved as different file formats.") |>
14961498
kable_styling(latex_options = "hold_position")
14971499
```

0 commit comments

Comments
 (0)