Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

How can you center a huxtable?

$
0
0

enter image description hereI've looked around and cannot find the answer to this anywhere in the documentation.

When creating a huxtable and knitting it in an R markdown document, there seems to be no way to center the table.

Rmd code to replicate is below. I've made the table rather wide to illustrate the point. The left hand margins are exceptionally wide. I've tried to center it with position(ht) <- "center" and this doesn't work.

---
title: "Example"
output: pdf_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, message = FALSE)
iris_lm <- lm(Sepal.Width ~ ., data = iris)

ht <- huxtable::huxreg(iris_lm, iris_lm, iris_lm, iris_lm)

ht

Viewing all articles
Browse latest Browse all 201839

Trending Articles



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