R gets shipped with LabKey as a default statistical tool. R provides tutorial on building packages, and rNIX is a package that implements standard functions used in R scripts within NIX environment.
If you believe a routine from rNIX would help your code, add the following lines to LabKey R-scripts:
.libPaths('/home/labkey/R/site-library')
library(devtools)
install_git('https://git0.fmf.uni-lj.si/studen/rNIX')
library(rNIX)
If you want to add functions to rNIX
, clone the git repository to a folder of your choice (we call it /path
from now on). Follow steps from package documentation, particularly:
edit R/file.R
where edit
is your favorite editor and file.R
is a file of your choice. If you think your function fits one of the files already in repository, you can append the file in question.DESCRIPTION
document('/path')
where path is the location where rNIX
was clonedcheck('/path')
. Typically, a note on failed sync is printed, but other errors or warnings should be cleared prior to further steps by repeating steps from above.install('/path')
. There are rarely problems here if previous steps were OK.git0
. On top of R file, there is a file with the name of the function in man
directory, and often, DESCRIPTION
changes as well. See what to commit by running git status
. The last step requires write permission to rNIX
repository, contact andrej.studen@fmf.uni-lj.si
to grant permissions.