/SimpleCInterfaceRPackage

A **VERY** simple R package to show how to call C functions from R.

Primary LanguageC

Building the R package

  • On Windows you will probably need to install the appropriate version of Rtools for your version of R. On linux, I think everything you need should just be there.
  • On Windows, make sure the appropriate paths are on the system path. I use the command:
    set PATH=C:\R\R-2.14.1\bin;C:\Rtools\bin;C:\Rtools\MinGW\bin;C:\Rtools\MinGW64\bin;%PATH%

from a batch file on my machine.

  • from the directory above the simplexample directory, run the command:
    R CMD INSTALL --build simplexample

to build the windows version (simplexample_<version>.zip) of the package, and

R CMD build simplexample
to build the gzip version (simplexample_<version>.gz) of the package.

Notes

  • The version number is specified in the DESCRIPTION file in the top level folder.
  • To learn more about packages, look at the PDF document accessible under Help -> Manuals (in PDF)-> "Writing R Extensions" from the R GUI. If you can't find it on your local system, Google for "R-exts.pdf"... or just go here.