R Server Packages

These resources are for managing the R packages installed in the R server.

List

GET /rserver/packages

List the installed packages. The returned data structure is a matrix.

This entry point requires Authentication of a user with administrator or manager role.

Example requests

Using cURL

curl --user administrator:password https://rock-demo.obiba.org/rserver/packages

Using R (rockr)

library(rockr)
conn <- rockr.connect(username="administrator", password="password", url = "https://rock-demo.obiba.org")
rockr.packages(conn)

Example response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "rowNames": [
    "annotate",
    "AnnotationDbi",
    "AnnotationFilter",
    "backports",
    "base64",
    "..."
  ],
  "columnNames": [
    "Package",
    "LibPath",
    "Version",
    "Priority",
    "Depends",
    "Imports",
    "..."
  ],
  "rows": [
    [
      "annotate",
      "/home/yannick/R/library",
      "1.68.0",
      null,
      "R (>= 2.10), AnnotationDbi (>= 1.27.5), XML",
      "Biobase, DBI, xtable, graphics, utils, stats, methods,\nBiocGenerics (>= 0.13.8), httr",
      null,
      "hgu95av2.db, genefilter, Biostrings (>= 2.25.10), IRanges,\nrae230a.db, rae230aprobe, tkWidgets, GO.db, org.Hs.eg.db,\norg.Mm.eg.db, hom.Hs.inp.db, humanCHRLOC, Rgraphviz, RUnit,",
      null,
      "Artistic-2.0",
      null,
      null,
      null,
      null,
      "no",
      "4.0.3",
      "Annotation for microarrays",
      "Using R enviroments for annotation.",
      "R. Gentleman",
      "Bioconductor Package Maintainer <maintainer@bioconductor.org>",
      "2020-10-27",
      null,
      null,
      null
    ],
    [
      "..."
    ]
  ]
}
Response JSON Object
  • rowNames (strings) – Array of R package names.

  • columnNames (strings) – Array of field names from the DESCRIPTION files.

  • rows (arrays) – Array of arrays of strings, each value corresponds to the row (=package) name and column (=field) name.

Request Headers
Response Headers
Status Codes

Update

PUT /rserver/packages

Update all CRAN R packages.

This entry point requires Authentication of a user with administrator or manager role.

Example requests

Using cURL

curl --user administrator:password -X PUT https://rock-demo.obiba.org/rserver/packages

Using R (rockr)

library(rockr)
conn <- rockr.connect(username="administrator", password="password", url = "https://rock-demo.obiba.org")
rockr.packages_update(conn)
Request Headers
Status Codes

Remove

DELETE /rserver/packages?name=(string: package_names)

Remove specified R packages.

This entry point requires Authentication of a user with administrator or manager role.

Example requests

Using cURL

curl --user administrator:password -X DELETE https://rock-demo.obiba.org/rserver/packages?name=annotate,rlang

Using R (rockr)

library(rockr)
conn <- rockr.connect(username="administrator", password="password", url = "https://rock-demo.obiba.org")
rockr.packages_rm(conn, c("annotate", "rlang"))
Query Parameters
  • name (string) – One or more R package names to remove, comma separated.

Request Headers
Status Codes

Install

POST /rserver/packages?name=(string: package_name)[&manager=(string: repo_name)][&ref=(string: ref_id)]

Install a R package from CRAN, GitHub or Bioconductor.

This entry point requires Authentication of a user with administrator or manager role.

Example requests

Using cURL

curl --user administrator:password -X POST https://rock-demo.obiba.org/rserver/packages?name=annotate&manager=cran

Using R (rockr)

library(rockr)
conn <- rockr.connect(username="administrator", password="password", url = "https://rock-demo.obiba.org")
rockr.package_install(conn, "annotate", manager = "cran")
Query Parameters
  • name (string) – The R package name to install.

  • ref (string) – The Git reference: branch or tag name, commit number. Applies to GitHub repository only. Default is master.

  • manager (string) – The R package repository type: cran, github/gh or bioconductor/bioc. Default is cran.

Request Headers
Status Codes

DataSHIELD

GET /rserver/packages/_datashield

Get the installed DataSHIELD R packages with their settings. The returned data structure is an object with one entry per DataSHIELD package.

This entry point requires Authentication of a user with administrator or manager role.

Example requests

Using cURL

curl --user administrator:password https://rock-demo.obiba.org/rserver/packages/_datashield

Using R (rockr)

library(rockr)
conn <- rockr.connect(username="administrator", password="password", url = "https://rock-demo.obiba.org")
rockr.packages_datashield(conn)

Example response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "dsBase": {
    "AggregateMethods": [
      "asFactorDS1",
      "asListDS",
      "boxPlotGGDS",
      "checkNegValueDS",
      "classDS",
      "corTestDS",
      "corDS",
      "covDS",
      "dataFrameSubsetDS1",
      "densityGridDS",
      "..."
    ],
    "AssignMethods": [
      "absDS",
      "asCharacterDS",
      "asDataMatrixDS",
      "asFactorDS",
      "asFactorDS2",
      "asIntegerDS",
      "asListDS",
      "asLogicalDS",
      "..."
    ],
    "Options": [
      "datashield.privacyLevel=5",
      "default.nfilter.glm=0.33",
      "default.nfilter.kNN=3",
      "default.nfilter.string=80",
      "default.nfilter.subset=3",
      "default.nfilter.stringShort=20",
      "default.nfilter.tab=3",
      "default.nfilter.noise=0.25",
      "default.nfilter.levels=0.33"
    ]
  },
  "resourcer": {
    "AssignMethods": [
      "as.resource.data.frame",
      "as.resource.object",
      "as.resource.tbl"
    ]
  }
}
Response JSON Object
  • AggregateMethods (strings) – Array of aggregation function names or name mappings.

  • AssignMethods (strings) – Array of assign function names or name mappings.

  • Options (strings) – Array of R options name and value.

Request Headers
Response Headers
Status Codes