All Projects → krlmlr → remake-tutorial

krlmlr / remake-tutorial

Licence: other
A hands-on tutorial for remake

Programming Languages

r
7636 projects

remake tutorial https://goo.gl/fnUyVk

  1. The basics
  2. Adding spice
  3. How to prepare vegetables?
  4. Where to buy?
  5. Working with remake projects
  6. Marinating the meat
  7. Reporting
  8. A tofu ragout
  9. Further steps

Prerequisites

install.packages("remotes") # if not yet installed
remotes::install_github(c("richfitz/remake", "krlmlr/cooking"))
install.packages("rmarkdown") # optionally, for the "Reporting" exercise

Test

Run in a fresh R session, this should complete without error:

test <- function() {
  temp_dir <- tempfile()
  dir.create(temp_dir)
  old <- setwd(temp_dir)
  on.exit(setwd(old))
  writeLines(
    c(
      "packages:", "- cooking", "targets:", "  all:", "    depends: chopped_meat",
      "  chopped_meat:", "    command: chop(I('raw_meat.csv'))"
    ),
    "remake.yml"
  )
  remake::make()
}

test()
#> [  LOAD ]
#> [  READ ]              |  # loading sources
#> <  MAKE > all
#> [ BUILD ] chopped_meat |  chopped_meat <- chop("raw_meat.csv")
#> [  READ ]              |  # loading packages
#> [ ----- ] all
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].