Question
Is there any way to cross reference fixest::etable()
?
I know etable
is a simple method, but it's actually very useful.
If there is a way to do this, it would be very helpful.
The environment is Windows 10, using R 4.1.2 and running bookdown::render_book()
in RStudio.
The following is the file structure and the contents of each file.
- index.Rmd
- _bookdown.yml
- _output.yml
Source code
index.Rmd
---
title: "test"
author: "null"
output: pdf_document
fontfamily: lmodern
documentclass: bxjsarticle
classoption: |
xelatex,
ja=standard,
a4
link-citations: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = FALSE,
warning = FALSE,
message = FALSE,
dev = "cairo_pdf",
results = "asis"
)
```
```{r model}
library(fixest)
model <- feols(dist ~ speed, cars)
```
```{r etable}
etable(model, title = "etable", tex = TRUE)
```
\@ref(tab:etable)
_bookdown.yml
delete_merged_file: true
_output.yml
bookdown::pdf_document2:
latex_engine: xelatex
dev: cairo_pdf
fig_caption: yes
number_sections: true
Results
As shown in the figure, the cross reference will be "??". For now, I have to number them by hand without using cross references.