knitr kable and “*”

Refresh

4 weeks ago

Views

161 time

1

I am trying to produce a table with a "*" as a value in a cell:

---
title: "Untitled"
author: "James Durant"
date: "November 7, 2017"
output: pdf_document
---

```{r arthmatic, echo=FALSE}
library(knitr)
dfx <- data.frame(
  Operator = c("+", "-", "*", "/", "^", "**", "%%", "%/%"),
  Operation = c("addition", "subtraction", "multiplication", 
                "division", "exponentiation", "exponentiation",
                "modulus", "integer division")
  )
kable(dfx, escape = FALSE)
```

But the * and the ** does not appear in the table: enter image description here

Any ideas?

1 answers

3

Replace each * with \\text{*} or \\textasteriskcentered