Skip to content

[help] what's the best way to interactively develop in an R script after its configured for a targets pipeline? #1363

Closed Answered by Aariq
brndngrhm asked this question in Help
Discussion options

You must be logged in to vote

In the above simple example, if I wanted to work on editing the explore_data() function, I'd probably, in the console, run:

library(targets)
tar_load(parquet_file_path)
tar_load_globals() #to load packages and functions

After running tar_load(parquet_file_path) there's a parquet_file_path object in my environment that prints/returns "path/to/analysis_data.parquet".

Then I'd open up the file with the explore_data() function and because I named my file path target the same as the file argument to that function, I can just run the code inside the function one line at a time until I get to the part I want to edit.

This pattern should work for anything. For example, if you had a function that …

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Aariq
Comment options

@brndngrhm
Comment options

@Aariq
Comment options

Answer selected by brndngrhm
@brndngrhm
Comment options

@joelnitta
Comment options

@brndngrhm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants