Vinh, Please have a look at RcppArmadillo 0.2.2 which should helpfully be easier to use in the cases you tried, ie outside of a package. A quick example is on my blog at http://dirk.eddelbuettel.com/blog/ -- Regards, Dirk