【问题标题】:Cross-referencing in R bookdown makes the figure name incorrectR bookdown中的交叉引用使图形名称不正确
【发布时间】:2021-07-08 06:22:44
【问题描述】:

我在 Rmarkdown 中制作图表并给它们命名和标题。但是一旦我在文档中交叉引用它们,它们的名字就毁了。

代码如下:

---
title: "Preliminary Statistics"
author: "Babak"
date: "6/28/2021"
output: 
  bookdown::html_document2:
    fig_caption: true
    
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(
    echo = FALSE,
    fig.width=9, 
    fig.height=5 ,
    message=FALSE, 
    warning=FALSE)
```

```{r Area_duplicate, fig.cap = "Area of duplicated and unique properties by municipality"}
<PLOT CODES>
```
Plot \@ref(fig:Area_duplicate) shows the area od duplicated properties in the dataset grouped by municipality.

结果:

screenshot of the caption

我应该怎么做才能解决这个问题?

【问题讨论】:

    标签: r plotly r-markdown bookdown cross-reference


    【解决方案1】:

    将名称中的下划线替换为“-”。

    【讨论】:

      猜你喜欢
      • 2020-10-06
      • 2018-09-23
      • 1970-01-01
      • 2019-01-06
      • 1970-01-01
      • 1970-01-01
      • 2020-08-09
      • 1970-01-01
      • 2020-04-27
      相关资源
      最近更新 更多