copy_package.Rd
This function is a convenience wrapper around clone_package()
that
copies a package rather than cloning it. The distinction is that new PIDs will
always be generated, and the system metadata will reflect a stand-alone package
rather than a clone. This function copies a data package from one DataONE Member Node to another,
with new identifiers This can also be used to restore an older version of a package
to a Member Node, provided that the user subsequently obsoletes the version of
the package that they used to create the copy using obsolete_package()
.
copy_package(resource_map_pid, from, to, public = FALSE, clone_children = FALSE)
resource_map_pid | (character) Object pid |
---|---|
from | (D1Client) D1Client to clone package from. (Token must be set for this node) |
to | (D1Client) D1Client to clone package to. (Token must be set for this node) |
public | (logical) Optional. Will set public read access. Defaults to |
clone_children | (logical) Optional. Will clone all children recursively if TRUE. Defaults to |
# NOT RUN { # First set up the member nodes we're copying between # (in this example they are the same but could be different) to <- dataone::D1Client("STAGING", "urn:node:mnTestARCTIC") from <- to # Choose a package to copy (here a new one is created) package <- arcticdatautils::create_dummy_package(to@mn) # }