I am working on a project with two separate .Rmd
files that are part of the same project. One file contains text and equations mainly and the other file contains figures/plots. Is it possible to cross-reference the figures from the second file into the first .Rmd
file?
File_1.Rmd
The following formula has revolutionized the car manufacturing industry. It predicts the mileage per gallon of a car based on its weight.
$$
mpg = f(wt)
$$
The formula is illustrated in Figure \@ref(fig:File_2.Rmd:plot)
.
File_2.Rmd
```{r plot}
ggplot(mtcars, aes(wt, mpg)) +
geom_point()
```
The output for both files is bookdown::pdf_document2
.