Merge branch 'master' of git.curoverse.com:arvados into 11876-r-sdk
[arvados.git] / sdk / R / README
1 R SDK for Arvados
2
3 Examples of usage:
4
5 --------------------------------------------------------------------------------------------------------------------------------
6
7 Get collection:
8
9 arv <- Arvados("insert_token", "insert_host_name")
10 arv$collection_get("uuid")
11
12 --------------------------------------------------------------------------------------------------------------------------------
13
14 List collections:
15
16 collectionList <- arv$collection_list(list("uuid", "=" "aaaaa-bbbbb-ccccccccccccccc"), limit = 10, offset = 2)
17
18 --------------------------------------------------------------------------------------------------------------------------------
19
20 Delete collection:
21
22 deletedCollection <- arv$collection_delete("uuid")
23
24 --------------------------------------------------------------------------------------------------------------------------------
25
26 Update collection:
27
28 updatedCollection <- arv$collection_update("uuid", list(collection = list(name = "new_name", description = "new_desciption")))
29
30 --------------------------------------------------------------------------------------------------------------------------------
31
32 Create collection:
33
34 updatedCollection <- arv$collection_update("uuid", list(collection = list(name = "new_name", description = "new_desciption")))
35
36 --------------------------------------------------------------------------------------------------------------------------------
37
38 --------------------------------------------------------------------------------------------------------------------------------
39
40 Things I'm currently working on and are not finished.
41
42 Collection manipulation:
43
44 arv <- Arvados("insert_token", "insert_host_name")
45
46 //This will be removed
47 arv$setWebDavToken("webdav_token")
48 arv$setWebDavHostName("full_path_to_the_collection_on_webdav_server")
49
50 collection <- Collection(arv, "uuid")
51 --------------------------------------------------------------------------------------------------------------------------------
52 This will return all files in collection as character vector.
53
54 listOfFilesInCollection <- collection$items
55 --------------------------------------------------------------------------------------------------------------------------------
56
57 This will return ArvadosFile or Subcollection from internal tree-like structure.
58
59 collection <- Collection(arv, "uuid")
60
61 arvadosFile <- collection.get("location/to/my/file.exe")
62 arvadosSubcollection <- collection.get("location/to/my/directory/")
63
64
65 --------------------------------------------------------------------------------------------------------------------------------