Rlabkey API

home
What is Rlabkey?
How do I set credentials to access LabKey data from my local machine?
How do I use the API?
Where can I get more documentation about Rlabkey?

 

What is Rlabkey?

It is an API which makes it easy for R users to load live data from a LabKey Server into the R environment.

Features of Rlabkey:

  • user must have appropriate permissions
  • user credentials are obtained from a separate location than the running R program
  • records stored on a LabKey Server can be:
    • read
    • inserted
    • updated
    • deleted
  • it uses HTTP requests to communicate with a LabKey Server

 

How do I set credentials to access LabKey data from my local machine?

Please, check the FAQ Security for details about setting credentials.

 

How do I use the API?

Install the "Rlabkey" package in the host from which one needs to access the remote LabKey data using the following command from the R console:

> install.packages("Rlabkey")  

Load the "Rlabkey" library at the start of every R script or in the R console using the following command:

> library(Rlabkey)  

Example of accessing the content of a list, using the method "labkey.selectRows()" in the R console:

> rows <- labkey.selectRows(baseUrl="https://labkey.scicore.unibas.ch/labkey", folderPath="Public datasets/Iris dataset",schemaName="lists", queryName="Iris")

 

Where can I get more documentation about Rlabkey?

  • List of available methods in the Rlabkey package: Rlabkey documentation (pdf)
  • Use the R command "RlabkeyUsersGuide()" to download the "Rlabkey Users Guide".
  • LabKey documentation in Rlabkey Package.

Discussion