Giter VIP home page Giter VIP logo

r-to-armadillo's Introduction

R To Armadillo (r2arma)

R-CMD-check

R is an amazing language to explore and communicate statistics with. However, when we care about attain results quickly, R’s primary weakness is shown: speed. The objective of this repository is to strengthen this weakness by providing high performing R base functions within Armadillo (and potentially eigen). Futhermore, as the code is written within C++, the code is able to be ported to different platforms at ease. Lastly, an additional benefit of this project is a repository containing programming examples by field.

Feel free to use the functions available within the repository per the MIT License.

Project Details

The functions written here act either as a means to replicate existing R functionality within Armadillo or as a helpful interface to Armadillo’s objects to perform crazier operations. These functions are meant to be easily included within existing code bases with minimal dependencies. In its packaged form, the project uses the R to C++ interface afforded by RcppArmadillo

Note: At some point in the future, these functions may end up being merged into the RcppArmadillo project.

The current implementation has:

  • Distributions
    • Random Sampling
      • Wishart
      • Inverse Wishart
  • Time Series
    • Difference by lag and number of differences
    • Discrete Integration by lag, number of differences, and - optionally - initial values.
    • Convert ARMA process to an infinite MA process
    • Compute the theoretical autocorrelation function (ACF) for an ARMA process.
    • Convolution (Moving Average) or Recursive (Autoregression) filters.
    • Calculate Discrete Fourier Transformation (DFT) for Autocovariance Function (ACF)
  • Sequences
    • Generate Integer Sequence from a to b
    • Generate Double Sequence form a to b or -a to a with n points.
    • Obtain a sequence along a vector.
    • Obtain a sequence given a vector length.
  • Manipulations
    • Vector
      • Reverse vector (e.g. 1:3 => 3:1)
    • Matrix
      • Reverse subset for row/column (e.g. 0:3 vs. 3:0)
      • Subset Non-connected Regions (e.g. c(0,1) and c(2,1))
    • Field
      • Convert field<vec> to mat
      • Total sum of elements in field

Contributing

Contributions such as translations of R functions to C++ are welcome via a pull request. If you have a new feature request, please feel free to write an issue.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

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.