                               ngsroi R package
                               ================

This directory contains the R package for ngs_roi which is called ngsroi.  The
package source can be found in the subdirectory ngsroi.  The directory
structure was generated by the package.skeleton command inside of R.

The package only contains portable R code and no binaries or C files.

Building
========

The package is first build for Linux on a Linux system and can then be
converted for Windows on a Windows system.

Building on Linux
-----------------

Go to the directory that this README file lives in and simply exeucte "make"
on the command line.  This will call "R CMD build ngsroi" and create a package
file ngsroi_VERSION.tar.gz.

  $ make
  R CMD build ngsroi
  * checking for file ‘ngsroi/DESCRIPTION’ ... OK
  ...
  $ ls *.tar.gz
  ngsroi_0.1.tar.gz

Converting the package on Windows
---------------------------------

To build a package for Windows, we need an R installation on Windows.  So
first install R for Windows (we are following [1] here).

Then, we have to install Rtools [2] so we get some utilities that are later
used for the conversion.  When installing Rtools, make sure to allow the
installer to add the paths to the binaries to your PATH environment variable.

Now, copy the Linux package ngsroi_0.1.tar.gz to your Windows computer.  You
can now use "R CMD INSTALL --build ngsroi_0.1.tar.gz" to create a ZIP file
from your R package.

  > cd C:\Users\USER\Downloads
  > "C:\PATH\TO\R.exe" CMD INSTALL --build ngsroi_0.1.tar.gz
  ...
  > dir *.zip
  ngsroi_0.1.zip

Installing the package on Windows
---------------------------------

Start the R GUI and install the package through "Packages -> Install from
local ZIP file".

References
==========

[1] http://www.biostat.wisc.edu/~kbroman/Rintro/Rwinpack.html
[2] http://cran.us.r-project.org/bin/windows/Rtools/
