pathJoin | R Documentation |
This function joins strings into a valid path. It is a simple version of python's
os.path.join
and fixes simple problems such as having/not having trailing /
in each section.
pathJoin(...)
... |
A set of strings to join. Each may be a single string or a vector. If you provide vectors they can either be all of the same length or where there are two lengths where one is equal to 1. |
string
A string with the merged path
pathJoin("my_base_path/helpers", "superfunction.R")
# 'my_base_path/helpers/superfunction.R'
base_dir <- "/home/tester/images"
out <- data.frame(filename = c("file1.png", "file2.png", "file3.png")) |>
dplyr::mutate(full_path = pathJoin(base_dir, filename))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.