[Rcpp-devel] rwishart Rcpp implementation

2015-06-11 Thread Yue Li
Dear List, I wonder if anyone could share their Rcpp code for an equivalence of rWishart. I’ve come across a similar question in the forum: http://stackoverflow.com/questions/23463852/generate-wishart-distribution-using-rwishart-within-rcpp

[Rcpp-devel] dyn.load error building package with Rcpp

2015-06-11 Thread Arjun Sharma
I'm trying to build a package using Rcpp that interfaces with an external C library. I was able to build and start writing a tests.R file, when I found a bug in my .cpp file. I made the fix, and when I tried to clean and rebuild I am getting the following error: Error in dyn.load(file, DLLpath =

Re: [Rcpp-devel] rwishart Rcpp implementation

2015-06-11 Thread Neal Fultz
I had ported the bayesm version a while a back, here it is: List rwishart(int nu, NumericMatrix const& V){// function to draw from Wishart (nu,V) and IW// // W ~ W(nu,V) E[W]=nuV// // WI=W^-1 E[WI]=V^-1/(nu-m-1) RNGScope rngscope; int m = V.nrow();mat Vm(V.begin(), m, m, false);// Can'

Re: [Rcpp-devel] rwishart Rcpp implementation

2015-06-11 Thread Neal Fultz
I had ported the bayesm version a while a back, here it is: List rwishart(int nu, NumericMatrix const& V){// function to draw from Wishart (nu,V) and IW// // W ~ W(nu,V) E[W]=nuV// // WI=W^-1 E[WI]=V^-1/(nu-m-1) RNGScope rngscope; int m = V.nrow();mat Vm(V.begin(), m, m, false);// Can'

Re: [Rcpp-devel] rwishart Rcpp implementation

2015-06-11 Thread Yue Li
Many thanks Neal! Yue > On Jun 11, 2015, at 5:07 PM, Neal Fultz wrote: > > I had ported the bayesm version a while a back, here it is: > > List rwishart(int nu, NumericMatrix const& V){ > <>// function to draw from Wishart (nu,V) and IW > <>// > <>// W ~ W(nu,V) E[W]=nuV > <>// > <>//

[Rcpp-devel] makevars file

2015-06-11 Thread Peter Rossi
Folks- I have made a package that includes a src/makevars file generated automatically by Rcpp. It passes all checks. contents of src/makevars: PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) PKG_CPPFLAGS += -I../inst/include/ I submitted to CRAN and got the following message: * checking for GN

Re: [Rcpp-devel] makevars file

2015-06-11 Thread Dirk Eddelbuettel
Peter, On 11 June 2015 at 19:07, Peter Rossi wrote: | I have made a package that includes a src/makevars file generated automatically | by Rcpp. It passes all checks. You can also create src/Makevars by hand... BTW it wants a capital M on OS with case-sensitive file systems. | contents of s