GithubHelp home page GithubHelp logo

jaeyk / rcpp-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coatless-api-docs/rcpp-api

0.0 1.0 0.0 344 KB

Source for the Unofficial Rcpp API Documentation

Home Page: http://thecoatlessprofessor.com/programming/rcpp/unofficial-rcpp-api-docs/

rcpp-api's Introduction

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:

  • Name of data type or function
  • Comment as to what arguments are accepted
  • Notes related to any limitations or C++ specific difference (e.g. 20 parameters for ::create())
  • Examples that are written as if they are embedded within a function or main alongside their expected output in comment form
    • Vectors or matrices should be written in uppercase and follow a logical alphabetic naming progression (e.g. A, B = 2*A)
    • Scalar should be written in lowercase (e.g. summed, val_summed)

The following sample echoes the above tenets

```
### sum( X ) {#sum}

- Compute the overall summation of all elements.

- Supported types are `Numeric`, `Integer`, or `Logical` in a `Vector` or `Matrix`. 

- Examples:

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

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

- See also:
    - [rowSums](#rowSums)
    - [colSums](#colSums)

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.

rcpp-api's People

Contributors

coatless avatar nathan-russell avatar ben519 avatar eddelbuettel avatar petehaitch avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.