Learn R Programming

targets (version 0.0.0.9000)

tar_path: Get the file path of a target's stored value.

Description

Get the file path of a target's stored value. Could be the target currently running in a pipeline or a target of your choice.

Usage

tar_path(name = NULL)

Arguments

name

Symbol, name of the target. If NULL, tar_path() returns the path of the target currently running in a pipeline.

Value

File path to the target.

Details

Call tar_path(name = "your_target") to get the file path of a selected target. Inside the command of a target, call tar_path() with no arguments to get the path to the target currently running. This function does not apply to dynamic files (targets with format = "file") because those paths are not known in advance.

Examples

Run this code
# NOT RUN {
tar_path(your_target)
tar_target(returns_path, tar_path())
# }

Run the code above in your browser using DataLab