install.packages("rstan", type = "source")
library("rstan")
#> Loading required package: ggplot2
#> Loading required package: StanHeaders
#> rstan (Version 2.17.3, GitRev: 2e1f913d3ca3)
#> For execution on a local, multicore CPU with excess RAM we recommend calling
#> options(mc.cores = parallel::detectCores()).
#> To avoid recompilation of unchanged Stan programs, we recommend calling
#> rstan_options(auto_write = TRUE)
I hereby claim:
- I am coatless on github.
- I am coatless (https://keybase.io/coatless) on keybase.
- I have a public key ASDlyT2FEqrzkSMu-ve8yuN89B0OHez19KBDtLvKpBu4zgo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Output: | |
20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | |
18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | |
16,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | |
14,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | |
12,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | |
10,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | |
8,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | |
6,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <RcppArmadillo.h> | |
#include <omp.h> | |
using namespace Rcpp; | |
using namespace arma; | |
// [[Rcpp::depends(RcppArmadillo)]] | |
// [[Rcpp::plugins(openmp)]] | |
// [[Rcpp::export]] | |
void updateImplicitX_p(arma::mat & X, const arma::mat & Y, const arma::mat & P, const arma::mat & C, double lambda, int cores = 1) { |