I imported data from an .xlsx file and one column contained text with multiline. Example:
Obs <- c("A", "B")
Feature <- c("0= none; 1=low; 2=med; 3=high", "0= Impossible; 1= possible")
Dat <- as.data.frame(Feature, Obs)
Pretty <- Dat %>%
kable(caption="Table 1. XXX", booktabs= T, escape=F) %>%
kable_styling()
Pretty
I would like having the element contains in feature on multiple lines. Knowing that read.excel kept the multiline by introducing "\n". I tried linebreak function, but it did nothing.
Obs <- c("A", "B")
Feature <- c("0= none; 1=low; 2=med; 3=high", "0= Impossible; 1= possible")
Dat <- as.data.frame(Feature, Obs)
linebreak(Dat)
Pretty <- Dat %>%
kable(caption="Table 1. XXX", booktabs= T, escape=F) %>%
kable_styling()
Pretty
Any advice on how to create multiline in a cell? Your inputs are greatly appreciated.
Bersard