Package autodiffr provides an R wrapper for Julia packages ForwardDiff.jl and ReverseDiff.jl through JuliaCall to do automatic differentiation for native R functions.

Installation

Julia is needed to use autodiffr. You can download a generic Julia binary from https://julialang.org/downloads/ and add it to the path. Pakcage autodiffr is not on CRAN yet. You can get the development version of autodiffr by

devtools::install_github("Non-Contradiction/autodiffr")

Important: Note that currently Julia v0.6.x, v0.7.0 and v1.0 are all supported by autodiffr, but to use autodiffr with Julia v0.7/1.0, you need to get the development version of JuliaCall by:

devtools::install_github("Non-Contradiction/JuliaCall")

Trouble Shooting and Way to Get Help

Julia is not found

Make sure the Julia installation is correct. autodiffr is able to find Julia on PATH, and there are three ways for autodiffr to find Julia not on PATH.

How to Get Help

Suggestion and Issue Reporting

autodiffr is under active development now. Any suggestion or issue reporting is welcome! You may report it using the link: https://github.com/Non-Contradiction/autodiffr/issues/new. Or email me at lch34677@gmail.com or cxl508@psu.edu.

Acknowledgement

The project autodiffr was a Google Summer of Code (GSoC) 2018 project for the “R Project for statistical computing” and with mentors John Nash and Hans W Borchers. Thanks a lot!