For a lot of editing tasks, we’ll first want to get some variables set up. For the following use cases, we’re going to be doing something to a package, which has a metadata file with the PID ‘X’ in it. Here’s how we set that up:
# Set up your environment first
options(dataone_test_token = "...") # Set your token here
env <- env_load("production")
# Set up some variables for later
my_eml_file <- "/path/to/the/file/on/disk/eml.xml"
pkg <- get_package(env$mn, metadata_pid)
At this point, we can do a number of things.