Tweet

Powered by CMake, the R package cmaker setups C/C++ develop environment for R package, to enjoy auto-complete, code navigation, parallel compiling and other features of IDE. Not convinced? Watch Xcode in action and give it a try. All the generated files are stored in sub-directory proj/ and cmake/ besides CMakeList.txt in package root directory, so it can be cleaned easily if not satisfied. Testing, suggestion, and pull request are welcome.

Usage

The IDE project generated by cmaker is for development of R package only. Always check and build R package following CRAN document before release.

You may copy the example from cmaker to set a playground with the following R command

file.copy(from = system.file("examples/rcppexample", package = "cmaker"),
          to = ".", recursive = TRUE)

cmaker only take care of the C/C++ source files, and R files should be edited in other editors, such as RStudio or Emacs/ESS.

Install

Windows is not supported yet due to complexity of compiling R packages in Windows. Will be supported soon. Please stay tuned.

System requirements

r cmaker depends on CMake and ninja. The newest versions are recommended.

  • Mac users may install them through MacPorts or Homebrew, with command

    port install cmake ninja

    or

    brew install cmake ninja
  • Linux users may install them through package management tools. You may need PPA or something similar to install the newest version.

Install the package

cmaker require devtools (>= 1.7.0.9000), which is not on CRAN yet. Install newest devtools from github, and then install cmaker from github. The following R script installs them automatically.

  • Mac and Linux

    if (! "devtools" %in% installed.packages())
      install.packages("devtools")
    if (packageVersion("devtools") < "1.7.0.9000") {
      ## The head of master branch is borken at time of writting.
      ## Install devtools 1.7.0.9000
      devtools::install_github("hadley/devtools", ref = "4d0964a1")
    }
    devtools::install_github("luckyrandom/cmaker")

Fork me on GitHub