Client side description file and folders

The description file

The description file of a DataSHIELD server site package is slightly different to that of the server R package. It is the same as that of a standard R package. For a more detailed explanations on R package description file read this documentation. In fact a DataSHIELD client side package is not really different from a standard R package and you can learn a lot more about building R package by reading this [comprehensive guide|http://cran.r-project.org/doc/manuals/r-release/R-exts.html.

To create the description file launch Rstudio load your project as already explained here, then go to the tab File, select New File and choose Text File. You now have a blank text file open; copy and paste or write the below lines on the blank text file. Then Go to the tab File on the Rstudio top menu bar and choose Save As, browser to your project folder and save the file under the name DESCRIPTION (note the capital letters). Now go to the top right sub-menu open the tab Build and click on Build & Reload. Once you have completed this some new files will appear in your package folder. The last line in the below description file states what package(s) how tutorial is dependent upon: if you are using functions from another package, state that package as a dependency.

Package: dsTutorialClient
Maintainer: <datashield@obiba.org>
Author: <datashield@obiba.org>
Version: 1.0.0
License: GPL-3
Title: DataSHIELD client side functions for my first package
Description: DataSHIELD tutorial functions for the client site
Depends: opal

Required directories/folders

In our DataSHIELD client packages there are three mandatory directories namely the R, man and data directories. The first holds the functions scripts (.R files), the second holds the documentation files (.rd files) and the last contains data file use for the examples which will be covered in more details. In additions there are other directories that can be added but for the server site package these are the only three we need.
To create these two directories go the bottom left of your Rstudio console (see image) go the to the tab Files and navigate to your project folder; there click on New Folder, type in the name of the folder (R) and click on OK. Do the same for the folders man and data. We are now ready to write our client site functions scripts and store them in the R folder.

DataSHIELD Wiki by DataSHIELD is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on a work at http://www.datashield.ac.uk/wiki