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
1
vote
0 answers

Is there a Julia equivalent of the targets R package?

The targets R package lets the user define an execution pipeline with minimal extra syntax and automatically handles things like cache and random seeds. It would be nice to have a similar tool in Julia. Closest thing I have found so far is…
1
vote
1 answer

In R targets, cannot read target object of class "dataset"

I am struggling with interoperability of R packages torch and targets. For example, if I define a target of class dataset (from torch), then it is impossible to read it with tar_read (from targets), and I cannot use it in other targets. Here is my…
1
vote
0 answers

Targets dependency missing in rmarkdown file which is included in another rmarkdown file

I have a targets pipeline that trains multiple models and in the end creates a flexdashboard (or Rmd file) that summarizes the models. For the summary I have an Rmd file that is included in the targets pipeline using tarchetypes::tar_render(). The…
David
  • 9,216
  • 4
  • 45
  • 78
1
vote
0 answers

R targets pipeline error: "Error : _paths_ missing files:" D:/path_to_my_file

I am learning to use targets within my current research project. I am still at the beginning of my data processing (and associated pipeline) but I get the following error when I try to use targets::tar_make(): > targets::tar_make() ✔ skip target…
Fanfoué
  • 165
  • 11
1
vote
1 answer

targets stalls with tar_make_clustermq()

I have a long-ish targets pipeline (takes more than an hour to execute) for which parallel execution is possible. Specifically, many, but not all, calculations can be done in parallel across 155 countries and 60 years. There are times when the…
1
vote
0 answers

R targets: Create two targets for each row in a tibble to track meta data and the resulting file

I want to utilize the R package targets to call shell commands and read results, e.g. the exit code into a new target. The commands are organized as a tibble with metadata attached to them. Currently, I have a workflow which runs the command of each…
danlooo
  • 10,067
  • 2
  • 8
  • 22
1
vote
1 answer

Combining the results of nested `tar_map` calls

I am creating a pipeline that allows for an arbitrary number of dataset names to be put in, where they will all be put through similar cleaning processes. To do this, I am using the targets package, and using the tar_map function from tarchetypes, I…
Kai Aragaki
  • 377
  • 3
  • 13
1
vote
2 answers

Can I set different degrees of parallelism for different targets with the R {targets} package?

I'm testing out the targets package and am running into a problem with customizing parallelization. My workflow has two steps, and I'd like to parallelize the first step over 4 workers and the second step over 16 workers. I want to know if I can…
adviksh
  • 123
  • 6
1
vote
1 answer

R targets multiple file outputs

I am looking into using R's targets but I am struggling to have it accept multiple file outputs. For example, I want to be able to take a dataset, create a train/test split and write each dataset to a separate file. An MWE would…
David
  • 9,216
  • 4
  • 45
  • 78
1
vote
0 answers

Installation of tensorflow terminated on RStudio Cloud

Similarly to posts here and here, I am having more trouble when I try to install TensorFlow in a new RStudio Cloud project. I know I need to set up both Miniconda and a virtual environment locally in /cloud/project/ so the Python dependencies stay…
landau
  • 5,636
  • 1
  • 22
  • 50
0
votes
0 answers

Management of columns of primary argument tibbles as secondary arguments, in functional programming in tidyverse

Functions$diversity <- function(db,entity,trait,v){ db %>% summarize(crossed = list(crossing(trait, trait)), .by = entity) %>% unnest(crossed) %>% rename( i = trait...1, j = trait...2 ) %>% left_join(db %>% transmute( …
0
votes
0 answers

Error in tbl_svysummary function when running R targets pipeline: "Error in statistic argument input"

I have a pipeline in targets that utilizes the tbl_svysummary function from the gtsummary package to generate a summary statistics table. When I run the individual functions within the pipeline, loading the necessary objects into the global…
0
votes
1 answer

Can function of _targets.R read object from targets list?

Problem Using targets package in r, we make functions and targets obejcts in _targets.R file. In a function, I want to calculate something not just based on the input obejects but also based on the objects in the global environment. However, seems…
Kang
  • 31
  • 3
0
votes
1 answer

Why is clock time much longer than reported execution time for a branch target?

I'm trying to optimize a highly parallel and memory-intensive targets pipeline. I'm noticing that the wall clock time for downstream dynamic branch targets is much longer than the reported execution time for the same target. Example: ● built branch…
0
votes
1 answer

tar_make() stalls when encountering nested error

I am running into a bizarre error where tar_make() and/or tar_make_future() will hang indefinitely. This happens with both plan(sequential) and plan(future.callr) so it is not the same as this issue. This is a little tricky because I am using…
mikeck
  • 3,534
  • 1
  • 26
  • 39