Tuesday, May 27, 2014

Proper TexLive 2013 installation on Ubuntu 12.04

For TeXLive 2012, but works perfectly with TeXLive 2013

http://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-ubuntu


Monday, May 5, 2014

Using RcppEigen with sparseMatrix class

ecode <- '
using Eigen::Map;
using Eigen::MatrixXd;
using Eigen::MappedSparseMatrix;
using Eigen::SparseMatrix;

MappedSparseMatrix<double> X(as<MappedSparseMatrix<double> >(XX));

SparseMatrix<double> Xc = SparseMatrix<double>(X);
Xc = SparseMatrix<double>(Xc.selfadjointView<Eigen::Lower>());

return wrap(Xc);
'

SeigenXSX <- cxxfunction(signature(SS = "matrix", XX="dgCMatrix"), ecode,
plugin = "RcppEigen")