Targets Helper is a Positron extension designed to enhance productivity when working with the targets
package in R. This extension provides commands to execute various targets
functions directly from the editor, making it easier to manage and run your data pipelines. Additionally, it includes a document symbol provider to recognize specific comment patterns in R files and organize them into a hierarchical structure.
-
Execute
targets::tar_read()
on selected target. -
Execute
targets::tar_load()
on selected target. -
Execute
targets::tar_make()
on selected target. -
Execute
targets::tar_make()
with debugging on selected target. -
Execute
targets::tar_make()
to build the whole pipeline. -
Execute
targets::tar_watch()
to monitor targets. -
Provides document symbols for R files, recognizing specific comment patterns and organizes them into a hierarchical structure.
-
Document Symbol Provider
The document symbol provider recognizes specific comment patterns in R files and organizes them into a hierarchical structure. This helps in navigating and understanding the structure of your R scripts.
- Comment Patterns:
- Level 1:
#tgt label -
- Level 2:
##tgt label -
- Level 3:
###tgt label -
- Level 1:
- Positron (will not run in VSC)
- R and the
targets
package installed
- Install it from a
.vsix
file. - Open Positron.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing
Ctrl+Shift+X
(orCmd+Shift+X
on macOS). - Click on the ellipsis and choose "install from vsix"
-
Execute
targets::tar_read
:- Command:
executeTargetsRead
- Keybinding:
Ctrl+Shift+T Ctrl+Shift+R
- Context: Editor text focus
- Command:
-
Execute
targets::tar_load
:- Command:
executeTargetsLoad
- Keybinding:
Ctrl+Shift+T Ctrl+Shift+L
- Context: Editor text focus
- Command:
-
Execute
targets::tar_make
on selected target:- Command:
executeTargetsMakeSelected
- Keybinding:
Ctrl+Shift+T Ctrl+Shift+M
- Context: Editor text focus
- Command:
-
Execute
targets::tar_make
:- Command:
executeTargetsMake
- Keybinding:
Ctrl+Shift+T Ctrl+Shift+K
- Context: Editor text focus
- Command:
-
Execute
targets::tar_make
with debugging for selected target:- Command:
executeTargetsDebugSelected
- Keybinding:
Ctrl+Shift+T Ctrl+Shift+D
- Context: Editor text focus
- Command:
-
Execute
targets::tar_watch
:- Command:
executeTargetsWatch
- Keybinding:
Ctrl+Shift+T Ctrl+Shift+W
- Context: Editor text focus
- Command:
- Select the target in your R script that you want to use as input for the
targets
function. - Use the corresponding keybinding or command from the Command Palette to execute the desired
targets
function.
No additional configuration is required. The extension uses the default settings provided by Positron and the targets
package in R.
- The extension requires the
targets
package to be installed in your R environment. - Ensure that the Positron API is available if you are using it for R code execution.
Initial release of Targets Helper.
This extension is licensed under the MIT License. See the LICENSE file for more information.
Contributions are welcome! Please open an issue or submit a pull request.
- Thanks to the developers of the
targets
package for creating a powerful tool for managing data pipelines in R. - Thanks to the Positron community for their support and contributions.