I am trying to cross-reference a regression table using the modelsummary package in R Quarto. When rendering the pdf document, where the reference should be, appears ?@tbl-test.
I followed the instructions on the official Quarto website (https://quarto.org/docs/authoring/tables.html), but it did not work. A google search did not give me any clues as to how to solve the problem.
Here is a minimal reproducible example. The yaml is not necessary for reproducing this invented example, but I use it for the pdf document I want to create and there might be an influence of the yaml setting.
Thanks a lot!
title: “Untitled”
editor: visual
format: pdf
fontfamily: libertinus
pdf-engine: pdflatex
documentclass: article
number-sections: true
toc: true
toccolor: blue
csl: american-political-science-association.csl
link-citations: true
execute:
echo: false
warning: false
bibliography: referencesQM.bib
fig-cap-location: top
fig-pos: “H”
lang: en
fontsize: 12pt
linestretch: 1.5
geometry: left=2.5cm, right=2.5cm, top=3cm, bottom=3cm
lof: true
lofcolor: blue
lot: true
lotcolor: blue
{r}
library(modelsummary)
Height <- c(156,176,178, 187,203,198,145,167,187,186)
Weight <- c(79,65,76,123,59,76,89,78,101,58)
Happiness <- c(1,5,7,10,3,5,3,6,8,7)
Dataset <- data.frame(Height, Weight, Happiness)
Simplelm <- lm(Happiness~Height+Weight, data = Dataset)
This should be a reference @tbl-test
{r}
#| label: tbl-test,
#| tbl-cap: "Test"
modelsummary(Simplelm)
ThomasKlein is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.