Skip to content

Rcpp API Documentation #602

@coatless

Description

@coatless

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 0.13.0 scheduled for release in
??.

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 (e.g. X, Y)
    • 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:

// 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.

Work In Progress:

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

Source: https://github.com/coatless/rcpp-api

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions