使用Drake进行Rmd时出现“目标缺少文件”错误

使用Drake进行Rmd时出现“目标缺少文件”错误,r,tidyverse,drake-r-package,R,Tidyverse,Drake R Package,我今天一直在学习如何使用Drake,并设法迁移了我的代码,但还没有迁移我的R降价报告。该报告编译得很好,并产生了预期的输出,但也给出了这个错误,这是任何搜索都无法解释的 我正在按照建议使用r_make命令,到目前为止,我的计划是: plan_0 <- drake_plan( raw_c_data = read_rds( file_in("data/css_carib_data.rds")), raw_c_fg = read_rds( file_in("data/cs

我今天一直在学习如何使用Drake,并设法迁移了我的代码,但还没有迁移我的R降价报告。该报告编译得很好,并产生了预期的输出,但也给出了这个错误,这是任何搜索都无法解释的

我正在按照建议使用r_make命令,到目前为止,我的计划是:

plan_0 <- drake_plan(
  raw_c_data = read_rds(
    file_in("data/css_carib_data.rds")),
  raw_c_fg = read_rds(
    file_in("data/css_carib_fg.rds")),
  c_data = clean_caribbean_fg(raw_c_data, raw_c_fg),
  clean_c_fg = write_rds(
    c_data,
    file_out("data/clean_c_fg.rds"),
    compress = "gz"),
  c_maps = gen_maps(bbx_1, bbx_2, bbx_3, bbx_4, bbx_5),
  c_maps_out = write_rds(
    c_maps,
    file_out("data/c_maps.rds"),
    compress = "gz"),
  c_base_report = rmarkdown::render(
    knitr_in("R/0_prepare_data.Rmd"),
    output_file = file_out("0_prepare_data.html"),
    quiet = T)
)

我很乐意根据需要附加更多内容,但希望这足以了解我为什么会出现此错误?

找出了问题所在,这是Rmd和Rproj/drake之间通常存在的冲突以及相对位置。我已经在R目录中找到了Rmd文件,但是_drake.R在基本目录中,因此在定位输出时的差异导致drake查找错误的位置。

次要的事情,但我认为您需要R包标记:R标记已经在这里@ericcusineaud上了。我刚才说的是,标签drake-r-package就是你特别提到的。德雷克是另一个不相关的软件包。啊,我不知道,抱歉-标签搜索有点难以导航
---
title: "0: Data Description"
output: html_document
---

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

require(drake)
require(tidyverse)
require(ggmap)

loadd(raw_c_fg)
loadd(clean_c_fg)
loadd(c_maps)
```

This document is a description of the data processed in `0_prepare_data.R` from the Caribbean region. The following table gives the counts of each classification within the aggregated functional groups.

```{r tables, echo = F}
raw_c_fg %>%
  pull(fg) %>%
  table() %>%
  knitr::kable(col.names = c("Class", "Count"),
               caption = "Counts of Each Functional Group")
```