Go to TogaWare.com Home Page. Data Science Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Improvements Using BookTabs

Raw The booktabs package for LaTeX provides additional functionality that we can make use of with knitr::kable(). To use this be sure to include the following in the preamble (before the \begin{document} of your .Rnw file:

# Load the package from the local library into the R session.

\usepackage{booktabs}

We can then set booktabs=TRUE to remove the clutter of the extra lines.

# Use the booktabs option to improve presentation of the table.

ds %>% kable(row.names=FALSE, digits=0, booktabs=TRUE)

Location MinTemp MaxTemp Rainfall Evaporation
Tuggeranong 10 25 0 NA
Wollongong 21 31 1 NA
Dartmoor 6 15 2 3
Sale 17 29 0 6
WaggaWagga 8 31 0 4
         

In the following example we notice that with more rows booktabs=TRUE will add a small gap every 5 rows.

# Display a tale with more observations.

weatherAUS[sample(nobs, 12), vars] %>%
  kable(row.names=FALSE, digits=0, booktabs=TRUE)

Location MinTemp MaxTemp Rainfall Evaporation
Perth 18 36 0 11
Tuggeranong -4 16 0 NA
Bendigo 3 22 0 NA
Brisbane 15 20 0 3
PearceRAAF 3 22 0 NA
Tuggeranong 12 25 63 NA
Launceston 13 20 29 NA
Tuggeranong 10 29 0 NA
Wollongong 16 23 0 NA
CoffsHarbour 5 20 0 NA
Hobart 13 20 2 3
Woomera 24 46 0 NA
         


Support further development by purchasing the PDF version of the book.
Other online resources include the GNU/Linux Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 2000-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.