Quantcast
Channel: Active questions tagged kable - Stack Overflow
Viewing all articles
Browse latest Browse all 109

How to print single asterisk in R Markdown table using 'kable'?

$
0
0

I created a table in an R Markdown document which I want to print in html format using kable and kable_styling from the kableExtra package. One column contains cells that should only show one single asterisk "*".

In the html, these cells are depicted as points / bulletpoints?! How can I change my output in a way that the single asterisks are just printed as asterisks (like the cells containing "**" or "***")?

Example Code:

```{r example}df <- data.frame(type = c("a", "b", "c", "d"),                 number = runif(4),                 asterisks = c("*", "*", "**", "***"))df %>%   kable(caption = "Single asterisk looks like point...") %>%   kable_styling(bootstrap_options = c("striped", "hover"), full_width = F, position = "left")```

html output:

enter image description here

Any help is highly appreciated. Thanks!


Viewing all articles
Browse latest Browse all 109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>