How to import all objects from a target pipeline ? #56
Answered
by
antoine-palazz
ThomasFaria
asked this question in
Q&A
-
How to import all objects from a target pipeline ? |
Beta Was this translation helpful? Give feedback.
Answered by
antoine-palazz
Mar 1, 2023
Replies: 1 comment
-
You can run the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ThomasFaria
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can run the
targets::tar_load_everything()
function to import all objects defined in the pipeline into the current environment. However, similar to Python, this approach can lead to naming conflicts and should be used with caution.It is generally better to selectively import only the objects that are needed from the pipeline using
targets::tar_read()
function. This approach is more explicit, reduces the risk of naming conflicts, and makes the code easier to read and maintain.