add_to_collection | R Documentation |
Add items(s) to an existing collection, using the item(s)' current (latest) version.
For datasets, the items should be files. For dataset collections, the items should be datasets.
If an item attempting to be added happens to already be in the collection,
this might lead to version conflicts, so the update will be rejected unless force
is true.
add_to_collection(collection_id, items, check_items = FALSE, force = FALSE)
collection_id |
Collection id. |
items |
Character vector of one or more dataset entity ids to add. |
check_items |
Whether to check that ids are really appropriate item types and remove non-appropriate item types
to help avoid Synapse errors (default |
force |
If some items are currently in the collection with a different version,
should these items be force-added using current version? The safe default is |
This is implemented with lower-level REST API because the Python client (as of v2.7) doesn't yet
implement dataset collection class and methods (but dataset and relevant methods like add_item
method are available).
Thus, while this is generic enough to handle both datasets and dataset collections
it is expected to be used more for dataset collections given that the dataset method is provided.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.