An Interface to the C++ Automatic Differentiation Library 'autodiff'

Provides an interface from R to the 'autodiff' library < https://autodiff.github.io/>, a modern header-only C++ library for automatic differentiation. Unlike numerical differentiation, automatic differentiation computes derivatives of functions to machine precision without truncation error, using either forward or reverse mode. The 'autodiff' header files are shipped with this package so that other R packages can use them by including 'Rcppautodiff' in the 'LinkingTo' field of their 'DESCRIPTION' file. Example programs demonstrate computing derivatives of single-variable and multi-variable functions, gradient vectors, Jacobian matrices and derivatives with respect to parameters, using 'Rcpp' and 'RcppEigen'.


R-CMD-check

Rcppautodiff

An R interface to the autodiff C++ library using Rcpp. autodiff is a modern, header-only C++17 library which provides an efficient and simple interface to perform automatic differentiation in C++. autodiff supports both forward and reverse mode of automatic differentiation. Rcppautodiff brings these capabilities to R. For more details on the autodiff library, please see its documentation and tutorials.

The vignette of this package also reproduces a number of examples from the autodiff library in R using Rcpp.

Installation

Rcppautodiff is not on CRAN yet. It can be installed from github using the following command in the R console.

pak::pkg_install('sn248/Rcppautodiff')

Examples

See the package vignette for a variety of examples.

Acknowledgement

This package would not exist without the wonderful autodiff, a modern, fast and expressive C++ library for automatic differentiation (by Allan M. M. Beal), found at https://autodiff.github.io/

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("Rcppautodiff")

0.1.0 by Satyaprakash Nayak, 3 months ago


https://github.com/sn248/Rcppautodiff, https://sn248.github.io/Rcppautodiff/


Report a bug at https://github.com/sn248/Rcppautodiff/issues


Browse source code at https://github.com/cran/Rcppautodiff


Authors: Satyaprakash Nayak [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL (>= 2) license


Imports Rcpp, RcppEigen

Suggests knitr, rmarkdown, tinytest

Linking to Rcpp, RcppEigen


See at CRAN