Introduction to Rcpp and RcppArmadillo
You can actually code in C++ in RStudio
References This post is based on several sources including; https://dirk.eddelbuettel.com/papers/useR2019_rcpp_tutorial.pdf
(Intro to Rcpp and Rcpparmadillo)
https://privefl.github.io/R-presentation/Rcpp.html
(Intro to Rcpp)
https://teuder.github.io/rcpp4everyone_en/
(for Rcpp object class, methods and functions)
http://arma.sourceforge.net/docs.html
(for RcppArmadillo class, methods and functions)
http://dirk.eddelbuettel.com/code/rcpp/Rcpp-sugar.pdf
(for Rcpp sugar functions, including prob dists)
https://teuder.github.io/rcpp4everyone_en/310_Rmath.html
(for Rmath in R:: namespace, mostly prob dists)
https://www.w3schools.com/cpp/cpp_math.asp
(for cmath in std:: namespace)