Description Usage Arguments Value Examples
This function allows you to attach a file to different content types
1 | attachFile(user, object, filepath, caption)
|
user |
A labstep user object. Must contain an 'api_key' field. Returned from 'login' command |
object |
The labstep object you want to comment on. Can be 'protocol', 'experiment' or 'resource' |
filepath |
The path to ther file to attach. |
caption |
A caption describing your file (optional) |
Returns a 'comment' object with the file attached
1 2 3 4 5 6 7 8 9 | user <- login("demo@labstep.com","demopassword")
expName = 'My First Experiment'
expDesc = 'An experiment testing the labstepR library'
experiment <- createExperiment(user,expName,expDesc)
filepath = 'mydata.RData'
save.image(filepath)
caption = 'The R workspace after running this script'
file <- attachFile(user,experiment,filepath,caption)
print(file)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.