synStore | R Documentation |
Creates a new Entity or updates an existing Entity, uploading any files in the process.
synStore(obj, used=NULL, executed=NULL, activity=NULL, activityName=NULL, activityDescription=NULL, createOrUpdate=NULL, forceVersion=NULL, versionLabel=NULL, isRestricted=NULL)
obj |
A Synapse Entity, Evaluation, or Wiki |
used |
optional named parameter: The Entity, Synapse ID, or URL |
executed |
optional named parameter: The Entity, Synapse ID, or URL representing code executed |
activity |
optional named parameter: Activity object specifying the user's provenance |
activityName |
optional named parameter: Activity name to be used in conjunction with *used* and *executed*. |
activityDescription |
optional named parameter: Activity description to be used in conjunction with *used* and *executed*. |
createOrUpdate |
optional named parameter: Indicates whether the method should automatically perform an update if the 'obj' |
forceVersion |
optional named parameter: Indicates whether the method should increment the version of the object even if |
versionLabel |
optional named parameter: Arbitrary string used to label the version. |
isRestricted |
optional named parameter: If set to true, an email will be sent to the Synapse access control team |
A Synapse Entity, Evaluation, or Wiki
## Not run:
# Create a new project
project <- Project('My uniquely named project')
project <- synStore(project)
# Adding files with provenance:
#
# A synapse entity *syn1906480* contains data
# entity *syn1917825* contains code
#
activity <- Activity(
'Fancy Processing',
description='No seriously, really fancy processing',
used=c('syn1906480', 'http://data_r_us.com/fancy/data.txt'),
executed='syn1917825')
file <- File('/path/to/data/file.xyz', description='Fancy new data', parent=project)
file <- synStore(file, activity=activity)
# Evaluation
eval <- Evaluation(
name = sprintf("My unique evaluation created on %s", format(Sys.time(), "%a %b %d %H%M%OS4 %Y")),
description = "testing",
contentSource = project$properties$id,
submissionReceiptMessage = "Thank you for your submission!",
submissionInstructionsMessage = "This evaluation only accepts files.")
eval <- synStore(eval)
# Wiki
content <- "
# My Wiki Page
Here is a description of my **fantastic** project!
"
wiki <- Wiki(owner = project,
title = "My Wiki Page",
markdown = content)
wiki <- synStore(wiki)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.