Reputation: 11
I want to make the table as in the picture using kableExtra.
I am trying to use the R code chunk below, but I get unexpected result. Could you please show me how to fix it?
```{r, echo=FALSE}
library(kableExtra)
df <- data.frame(
Operator = c("`==`", "`!=`", "`>`", "`<`", "`>=`", "`<=`"),
Interpretation = c("Equal to", "Not equal to", "Greater than", "Less than", "Greater than or equal to", "Less than or equal to")
)
df %>% kbl() %>% kable_styling(bootstrap_options = c('striped', 'hover', 'condensed'))
```
Upvotes: 1
Views: 205
Reputation: 1449
This is the closest I could do
library(kableExtra)
df <- data.frame(
Operator = c("==", "!=", ">", "<", ">=", "<="),
Interpretation = c("Equal to", "Not equal to", "Greater than", "Less than", "Greater than or equal to", "Less than or equal to")
)
df %>%
kbl() %>%
kable_classic(full_width=F, html_font="Cambria") %>%
row_spec(0, bold=TRUE)
Upvotes: 2