This package allows the transfer of data between a LabKey Server and an R session. Data can be retrieved from
LabKey into a data frame in R by specifying the query schema information (labkey.selectRows
and getRows
)
or by using sql commands (labkey.executeSql
). From an R session, existing data can be updated
(labkey.updateRows
), new data can be inserted (labkey.insertRows
and labkey.importRows
) or
data can be deleted from the LabKey database (labkey.deleteRows
). Interactive R users can discover available data via
schema objects (labkey.getSchema
).
Valerie Obenchain
Package: | Rlabkey |
Type: | Package |
Version: | 3.3.0 |
Date: | 2024-08-08 |
License: | Apache License 2.0 |
LazyLoad: | yes |
The user must have appropriate authorization on the LabKey Server in order to access or modify data using these functions.
All access to secure content on LabKey Server requires authentication via an api key (see labkey.setDefaults
for
more details) or a properly configured netrc file that includes the user's login information.
The netrc file is a standard mechanism for conveying configuration and autologin information to the File Transfer Protocol client (ftp) and other programs such as CURL. On a Linux or Mac system this file should be named .netrc (dot netrc) and on Windows it should be named _netrc (underscore netrc). The file should be located in the user's home directory and the permissions on the file should be unreadable for everybody except the owner.
To create the _netrc on a Windows machine, first create an environment variable called 'HOME' set to your home directory (e.g., c:/Users/<User-Name> on recent versions of Windows) or any directory you want to use. In that directory, create a text file named _netrc (note that it's underscore netrc, not dot netrc like it is on Linux/Mac).
The following three lines must be included in the .netrc or _netrc file either separated by white space (spaces, tabs, or newlines) or commas.
machine <remote-machine-name>
login <user-email>
password <user-password>
One example would be:
machine localhost
login peter@labkey.com
password mypassword
Another example would be:
machine atlas.scharp.org login vobencha@fhcrc.org password mypassword
Multiple such blocks can exist in one file.
http://www.omegahat.net/RCurl/,
https://www.labkey.org/home/project-begin.view
labkey.selectRows
, labkey.executeSql
, makeFilter
,
labkey.insertRows
, labkey.importRows
,
labkey.updateRows
, labkey.deleteRows