coatless-api-docs / rcpp-api

Source for the Unofficial Rcpp API Documentation
http://thecoatlessprofessor.com/programming/rcpp/unofficial-rcpp-api-docs/
47 stars 11 forks source link
c-plus-plus r rcpp rmarkdown

Rcpp API Documentation (rcpp-api)

This repository contains the Rcpp API documentation project. The project is rooted in providing a much needed face lift to working with one of the most popular ways to augment R with C++.

Goal

Provide documentation that lists, describes, and provides an example of each known Rcpp data type and function alongside best practices. The documentation should be ready for inclusion within Rcpp 1.x.0 scheduled for release in January 2018.

Style

The main style for this documentation will mimic the Armadillo documentation that involves first listing the different data structures before detailing class methods and overall function uses.

Each section should contain:

The following sample echoes the above tenets

sum( X ) {#sum}

// Sample data
NumericVector X = NumericVector::create(3.2, 8.1, 9.5, 8.6, 5.7);

double val_sum = sum(X);
// Output: 35.1

Functions that share common features such as the trigonometric and probability distribution functions should be grouped together under a common banner to decrease repeative entries. The name of the entry should be [subject](#subject-ref-tag) to allow for "See also" links and inclusion in the Table of Contents.

Contributing

To contribute, please submit a Pull Request (PR) with the desired documentation change.