Skip to contents

This function adds DVC tracking to files that have been written using tidyverse write functions. It is designed to be used in a pipe chain after write operations.

Usage

dvc_track(path, message = NULL, push = FALSE)

Arguments

path

The path to the file that was written

message

An optional commit message for DVC

push

Logical. Whether to push changes to Git remote (default: FALSE)

Value

The input path (invisibly) to allow for further piping

Examples

if (FALSE) { # \dontrun{
data |>
  readr::write_csv("data/processed/mydata.csv") |>
  dvc_track("Updated processed data", push = TRUE)
} # }