This function allows you to create an experiment card.

createExperiment(user, name, description = NULL, protocolIds = NULL)

Arguments

user

A labstep user object. Must contain an `api_key` field. Returned from `login` command

name

The name you want to give your experiment.

description

Give your experiment a description to help you remember what it was about.

protocolIds

List of ids for protocols to attach to the experiment.

Value

Returns an `experiment` object

Examples

user <- login("demo@labstep.com","demopassword") expName = 'My First Experiment' expDesc = 'An experiment testing the labstepR library' experiment <- createExperiment(user,expName,expDesc) print(experiment)
#> $id #> [1] 29800 #> #> $created_at #> [1] "2020-01-30T16:39:29+00:00" #> #> $updated_at #> [1] "2020-01-30T16:39:29+00:00" #> #> $locked_at #> NULL #> #> $deleted_at #> NULL #> #> $started_at #> [1] "2020-01-30T16:39:29+00:00" #> #> $ended_at #> NULL #> #> $due_at #> NULL #> #> $name #> [1] "My First Experiment" #> #> $description #> [1] "An experiment testing the labstepR library" #> #> $author #> $author$id #> [1] 4524 #> #> $author$username #> [1] "demo@labstep.com" #> #> $author$name #> [1] "Demo Labstep" #> #> $author$first_name #> [1] "Demo" #> #> $author$last_name #> [1] "Labstep" #> #> $author$profile #> $author$profile$id #> [1] 5751 #> #> $author$profile$photo #> NULL #> #> #> #> $thread #> $thread$all_comment_count #> [1] 0 #> #> $thread$comment_count #> [1] 0 #> #> $thread$id #> [1] 673389 #> #> #> $experiments #> list() #> #> $signatures #> list() #> #> $perma_link #> $perma_link$id #> [1] 480270 #> #> $perma_link$token #> [1] "556ec0db-3d63-4aac-93f9-88d3020fdefe" #> #> #> $share_link #> NULL #> #> $permissions #> $permissions$view #> [1] TRUE #> #> $permissions$edit #> [1] TRUE #> #> $permissions$owner #> [1] TRUE #> #> #> $locked_log #> NULL #> #> $comment_count #> [1] 0 #> #> $owner #> $owner$id #> [1] 6867 #> #> $owner$name #> [1] "Demo Labstep workspace" #> #> $owner$created_at #> [1] "2019-08-06T20:34:00+00:00" #> #> $owner$deleted_at #> NULL #> #> $owner$description #> NULL #> #> $owner$profile #> $owner$profile$id #> [1] 19084 #> #> $owner$profile$photo #> NULL #> #> #> $owner$is_home #> [1] TRUE #> #>