Learn R Programming

Rlabkey (version 2.1.121)

Rlabkey-package: Exchange data between LabKey Server and R

Description

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) or data can be deleted from the LabKey database (labkey.deleteRows). Interactive R users can discover available data via schema objects (labkey.getSchema).

Arguments

Details

ll{ Package: Rlabkey Type: Package Version: 2.1.121 Date: 2013-02-05 License: Apache License 2.0 LazyLoad: yes } The user must have the appropriate authorization on the LabKey Server in order to modify the database through the use of these functions. Using this package to access a password protected LabKey data base requires that the user has their login information in a netrc file. The netrc file contains configuration and autologin information for the File Transfer Protocol client (ftp) and other programs such as CURL.

On a UNIX system this file should be named .netrc (dot netrc) and on windows it sould be named _netrc (underscore netrc). The file should be located in the users 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' that is set to your home directory (c:/Users/ on Vista) 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 UNIX).

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 login 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.

References

http://www.omegahat.org/RCurl/, http://dssm.unipa.it/CRAN/web/packages/rjson/rjson.pdf, http://www.labkey.org/project/home/begin.view

See Also

labkey.selectRows, labkey.executeSql, makeFilter, labkey.insertRows, labkey.updateRows, labkey.deleteRows The Rlabkey Users Guide is available by typing RlabkeyUsersGuide().