Questions tagged [targets-r-package]

The targets package is a pipeline toolkit for Make-like declarative workflows in R. Please visit the documentation website at https://wlandau.github.io/targets/ for more information.

50 questions
0
votes
0 answers

tar_map over tibble list-column drops class

Consider this reprex: targets::tar_dir({ # tar_dir() runs code from a temporary directory. targets::tar_script({ library(dplyr) values_df = tibble(index = 1:3, df = list(mtcars)) list( tarchetypes::tar_map( values_df, names =…
mikeck
  • 3,534
  • 1
  • 26
  • 39
0
votes
0 answers

Cant take away error branches from targets package workflow

The problem Hello everyone, I am new to the targets package, and I am trying to make a workflow. For this workflow I am using extensively a package I am developing called SDMWorkflows that you can install from github using…
Derek Corcoran
  • 3,930
  • 2
  • 25
  • 54
0
votes
1 answer

`targets`: Use a `file` target in the pipeline that has been deleted since the last `tar_make()`

Goal My goal is to use a file target that has been deleted since the last tar_make() in the target pipeline for further processing. Example An example of this would be a pipeline that attempts to keep an input directory of csv's synchronised with…
0
votes
0 answers

Using {targets} and {box}

What would be the best way to use {targets} but writing all the functions using {box}? The problems I am facing are mainly that it is verbose to "source" the functions in my module (box::use() instead of tar_source()) and any alteration in the code…
glhrm
  • 51
  • 2
0
votes
1 answer

specify group_by variables programmatically in targets workflow with static branching

I'm using the targets package in R to organize data processing and analysis for some studies that involve multiple different data sources (surveys, performance metrics on different tasks, etc). Because some of the tasks produce large quantities of…
Melissa Key
  • 4,476
  • 12
  • 21
0
votes
0 answers

How to pass values into _targets.R or use dynamic variables

I have a shiny app that sources and calls tar_make() a _targets.R file. In this file I have two variables who's values I have hard coded but I want to set these variable values dynamically from input texts my Shiny UI. Is there a way for me to pass…
Oamar Kanji
  • 1,824
  • 6
  • 24
  • 39
0
votes
1 answer

object not found when creating targets list programmatically

I'm trying to generate a {targets} list programmatically, via a function in an R package. get_pipeline <- function(which_countries) { countries <- NULL # avoid R CMD CHECK warning print(which_countries) # Shows that which_countries is available …
0
votes
0 answers

Using reticulate with targets

I'm having this weird issue where my target, which interfaces a slightly customized python module (installed with pip install --editable) through reticulate, gives different results when it's being called from an interactive session in R from when…
Extrapolator
  • 343
  • 3
  • 7
0
votes
1 answer

Non-interactive tar_visnetwork()/tar_glimpse()?

Background: I work in terminal R on a remote system and don't have interactive graphical capabilities. Perhaps I could manage to get X11 working but so far I have been productive using some workarounds, rendering plots to file directly and mounting…
Extrapolator
  • 343
  • 3
  • 7
0
votes
0 answers

Compiling a list of static targets without tar_read_raw?

I have a sizeable set (n ~= 20) of static targets of which I need to load a large number of different subsets for different analyses. Currently, I'm using an object loading function that wraps tar_read_raw for this, but this breaks my pipeline's…
Extrapolator
  • 343
  • 3
  • 7
0
votes
1 answer

Conditional static branching in R targets

I'm using the targets pipelining system in R and am wondering how to statically branch optimally. I have a set of parameters for which I'd like to compute results for most but not all interactions. Notice how N_source_components and…
Extrapolator
  • 343
  • 3
  • 7
0
votes
1 answer

rsync'ed outputs are always marked as outdated

Using {targets} to manage a workflow, which is great. We don't have a proper cluster setup, but I have access to remote machines with much better specs than my laptop, so I can use git to keep the plan in sync locally and remotely. When I want to…
rmflight
  • 1,871
  • 1
  • 14
  • 22
0
votes
1 answer

Improve parallel performance with batching in a static-dynamic branching pipeline

BLUF: I am struggling to understand out how to use batching in the R targets package to improve performance in a static and dynamic branching pipeline processed in parallel using tar_make_future(). I presume that I need to batch within each dynamic…
mikeck
  • 3,534
  • 1
  • 26
  • 39
0
votes
1 answer

Dealing with zip files in a targets workflow

I'm trying to set up a workflow that involves downloading a zip file, extracting its contents, and applying a function to each one of its files. There are a few issues I'm running into: How do I set up an empty file system reproducibly? Namely, I'm…
Kai Aragaki
  • 377
  • 3
  • 13
0
votes
0 answers

rmarkdown render NSE function fails only inside callr

I seem to have a weird combination of NSE, rmarkdown and callr, similar in flavor to Is it possible to disable `callr` for RMarkdown?. When I set a value to a variable to use it in something similar to a filter call implemented using NSE via nested…
rmflight
  • 1,871
  • 1
  • 14
  • 22