| orderly_shared_resource | R Documentation |
Copy shared resources into a packet directory. You can use this to
share common resources (data or code) between multiple packets.
Additional metadata will be added to keep track of where the files
came from. Using this function requires the shared resources
directory shared/ exists at the orderly root; an error will be
raised if this is not configured when we attempt to fetch files.
orderly_shared_resource(...)
... |
The shared resources to copy. If arguments are named, the name will be the destination file while the value is the filename within the shared resource directory. You can use a limited form of string interpolation in the names of
this argument; using |
Invisibly, a data.frame with columns here (the filenames
as as copied into the running packet) and there (the filenames
within shared/). Do not rely on the ordering where directory
expansion was performed.
# An example in context within the orderly examples:
orderly_example_show("shared")
# Here's the directory structure for this example:
path <- orderly_example(names = "shared")
fs::dir_tree(path)
# We can run this packet:
orderly_run("shared", root = path)
# In the final archive version of the packet, 'cols.R' is copied
# over from `shared/`, so we have a copy of the version of the code
# that was used in the analysis
fs::dir_tree(path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.