I have not been able to format tables as I do in markdown. Is there another way to format tables and control their sizes?
Here is an example of a table that I'm formatting using kableExtra, I'm not very familiar with bookdown so I may be missing something relevant, I do apologize if that's the case.
#load libraries
library(knitr)
library(kableExtra)
Species <- c("Brassica oleracea", "Brassica rapa", "Eruca sativa", "Sinapis alba", "Ipomoea aquatica", "Ipomoea purpurea", "Capsicum annuum", "Petunia integrifolia", "Solanum lycopersicum", "Solanum melongena")
Species <- as.character(Species)
Common_names <- c("Wild cabbage", "Pak choi", "Rocket", "White mustard", "Water spinach", "Morning glory", "Capsicum", "Petunia", "Tomato", "Eggplant")
Common_names <- as.character(Common_names)
Variety <- c("Capitata", "Chinensis", "", "", "", "", "California Wonder", "", "Tommy Toe", "Little Fingers")
Variety <- as.character(Variety)
Source <- c("https://www.mrfothergills.com.au/", "https://www.mrfothergills.com.au/", "https://www.mrfothergills.com.au/", "https://www.mrfothergills.com.au/", "https://www.theseedcollection.com.au/", "http://www.shaman-australis.com.au", "https://www.edenseeds.com.au", "https://www.dianeseeds.com/", "https://www.mrfothergills.com.au/", "https://www.4seasonsseeds.com.au/")
Source <- as.character(Source)
t <- data.frame(Species, Common_names, Variety, Source)
colnames(t) <- c("Species", "Common names", "Varieties", "Source")
kable(t, format = "latex", longtable = T, booktabs = T,linesep = "\\addlinespace",
caption = "\\textbf{Table S1.} Species names, common names, varieties and sources of the different seeds.") %>%
kable_styling(latex_options = c("repeat_header","striped"), font_size = 10, full_width=T) %>% row_spec(0,bold=TRUE) %>%
column_spec(1,italic =T)
However, in bookdown I'm unable to run it with the kable_styling specifications. Sorry if this is not an issue!