RMarkdown-Cross-Referenzen mit Flextable funktionieren nicht in HTML

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: RMarkdown-Cross-Referenzen mit Flextable funktionieren nicht in HTML

by Anonymous » 14 Apr 2025, 17:35

Ich versuche, Tabellen in einer HTML-RMarkdown-Ausgabe zu referenzieren. Es funktioniert, wenn die Ausgabe ein PDF
Ein reproduzierbares Beispiel ist und Sitzungsinformationen unter dem folgenden Link
https://rpubs.com/stebif68/1236124

Code: Select all

---
title: "reproducible example"
date: "2023-04-13"
output:
bookdown::html_document2: default
bookdown::pdf_document2: default
---

```{r setup, include=FALSE}
knitr::opts_chunk$set
library(tidyverse)

library(flextable)
library(officer)
```

```{r, echo=F}
sessionInfo()
```

Table \@ref(tab:test) with kable is working in both html & pdf

```{r test, echo=TRUE}

kableExtra::kable(tibble(variable= "hello", another = "bye"), caption = "The mtcars data.")

```

Table \@ref(tab:tab2) with flextable in html in not working

```{r ft.align="center", tab.cap='airquality dataset', tab.id='tab2', label='tab2', echo=T}
ft

Top