Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread Robin Girard
Yes sorry about that, but since my problem is a path setting and requires windows this might not be reproducible. My fault. The suggestion of Hadley does not work for me : I got make: execvp: ../_scripts/knit.sh: Permission denied I suspect this is a problem of relative path but changing this

Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread John Buonagurio
Hi Robin, Those exact linker errors occur if you use a different version of MinGW than the Rcpp static library. Could that possibly be the case? If so make sure to install Rcpp from source. For example: install.packages("C:/CRAN/Rcpp_0.10.3.tar.gz", repos=NULL, type="source") Make sure you hav

Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread Dirk Eddelbuettel
Robin, If you want meaningful help you need to supply a _reproducible example_ and not just error logs. Those are not really sufficient. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com ___ Rcpp-devel mailing list Rcpp-deve

Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread Hadley Wickham
> Dear Hadley, Dirk removed 3/4 of my original message :) I just added it now > after your email so that our discussion inherit from the past. That was me - I don't think it's relevant to your problem. > - When I run make from MinGW terminal in the src folder of the git web site > this fails (t

Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread Robin Girard
Dear Hadley, Dirk removed 3/4 of my original message :) I just added it now after your email so that our discussion inherit from the past. There are details there but still I admit it lacks informations. Let me summarize: - When I run make from MinGW terminal in the src folder of the git web

Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread Hadley Wickham
> I know this has to do with my library path (and actually when I launch the > function "knit(input,output)" in R for a given Rcpp example this works and > generate the markdown file) but don't find where this comes from. Could you be more explicit? How are you running make? And how are you runn

Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread Dirk Eddelbuettel
On 17 April 2013 at 18:04, Robin Girard wrote: | | | Thanks a lot Dirk, | | My errors have nothing to do with Jeckyll, the beginning of my mail was to say this part works fine. Ok. | My error appears while compiling the R/cpp code of the first example with the makefile. As I said, when I

Re: [Rcpp-devel] Best way to compute M'M if M is triangular using RcppArmadillo

2013-04-17 Thread Ahmadou Dicko
I still don't get why you are copying the whole object. But if you really want to initialize an array of the desired size, you can use arma::copy_size In you case it will be something like mat prodM; prodM.copy_size(M); . On Wed, Apr 17, 2013 at 3:24 PM, F.Tusell wrote: > El mi

Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread Robin Girard
Thanks a lot Dirk, My errors have nothing to do with Jeckyll, the beginning of my mail was to say this part works fine. My error appears while compiling the R/cpp code of the first example with the makefile. As I said, when I launch your knit function from R for a given example this seems

Re: [Rcpp-devel] Rcpp::List::create(...) with more than 20 elements ?

2013-04-17 Thread Dominique Belhachemi
Thanks Romain and Dirk, I just implemented those alternatives and it is working now. -Dominique On Wed, Apr 17, 2013 at 10:11 AM, Dirk Eddelbuettel wrote: > > On 17 April 2013 at 09:54, Dominique Belhachemi wrote: > | Hi everyone, > | > | I am porting some code from the old API to the new API

Re: [Rcpp-devel] Best way to compute M'M if M is triangular using RcppArmadillo

2013-04-17 Thread F.Tusell
El mié, 17-04-2013 a las 14:01 +, Smith, Dale (Norcross) escribió: > I agree with Dirk. Take a look at the arma::mat constructor in fastLm. If you > are not modifying M, use the raw memory constructor. > > http://gallery.rcpp.org/articles/fast-linear-model-with-armadillo/ > > I don't see any

Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread Dirk Eddelbuettel
On 17 April 2013 at 16:44, Robin Girard wrote: | Salut list, | I'm trying to become soon a (small) contributor to Rcpp Gallery Yay. That's the spirit! | and I would like to be able to visualize the result before pushing it. So just run knitr over it. | I'm on windows... My condolences. |

[Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread Robin Girard
Salut list, I'm trying to become soon a (small) contributor to Rcpp Gallery and I would like to be able to visualize the result before pushing it. I'm on windows... I managed to install jeckyll and made it work (this http://bradleygrainger.com/2011/09/07/how-to-use-github-pages-on-windows.html

Re: [Rcpp-devel] Rcpp::List::create(...) with more than 20 elements ?

2013-04-17 Thread Dirk Eddelbuettel
On 17 April 2013 at 09:54, Dominique Belhachemi wrote: | Hi everyone, | | I am porting some code from the old API to the new API like in the following | example. | | -      SEXP ret = R_NilValue; | -  RcppResultSet rs; | -  rs.add("foo1", bar1); | -  rs.add("foo2", bar2); | -  re

Re: [Rcpp-devel] Best way to compute M'M if M is triangular using RcppArmadillo

2013-04-17 Thread Conrad S
On Wed, Apr 17, 2013 at 10:24 PM, F.Tusell wrote: > SEXP Prod1(SEXP M_) { > const mat M = as(M_) ; > mat prodM = M ; > prodM = trans(M) * M ; > return(wrap(prodM)) ; > } Why are you making a copy of M (as prodM) before doing the multiplication ? Why not just directly do "mat prodM = M.t(

Re: [Rcpp-devel] Rcpp::List::create(...) with more than 20 elements ?

2013-04-17 Thread Romain Francois
Le 17/04/13 15:54, Dominique Belhachemi a écrit : Hi everyone, I am porting some code from the old API to the new API like in the following example. - SEXP ret = R_NilValue; - RcppResultSet rs; - rs.add("foo1", bar1); - rs.add("foo2", bar2); - ret = rs.getReturnList();

Re: [Rcpp-devel] Best way to compute M'M if M is triangular using RcppArmadillo

2013-04-17 Thread Smith, Dale (Norcross)
I agree with Dirk. Take a look at the arma::mat constructor in fastLm. If you are not modifying M, use the raw memory constructor. http://gallery.rcpp.org/articles/fast-linear-model-with-armadillo/ I don't see any other way to avoid using Rcpp::wrap in the return statement. Note there may be ot

[Rcpp-devel] Rcpp::List::create(...) with more than 20 elements ?

2013-04-17 Thread Dominique Belhachemi
Hi everyone, I am porting some code from the old API to the new API like in the following example. - SEXP ret = R_NilValue; - RcppResultSet rs; - rs.add("foo1", bar1); - rs.add("foo2", bar2); - ret = rs.getReturnList(); + SEXP ret = R_NilValue; + ret = Rcpp::List

Re: [Rcpp-devel] Best way to compute M'M if M is triangular using RcppArmadillo

2013-04-17 Thread Dirk Eddelbuettel
On 17 April 2013 at 14:24, F.Tusell wrote: | Not a question strictly about Rcpp but hope this is a right | place to ask. | | I am trying to find out what is the fastest possible way to compute | M'M for M upper triangular. I have coded, | | // [[Rcpp::export]] | SEXP Prod1(SEXP M_) { | const

[Rcpp-devel] Best way to compute M'M if M is triangular using RcppArmadillo

2013-04-17 Thread F.Tusell
Not a question strictly about Rcpp but hope this is a right place to ask. I am trying to find out what is the fastest possible way to compute M'M for M upper triangular. I have coded, // [[Rcpp::export]] SEXP Prod1(SEXP M_) { const mat M = as(M_) ; mat prodM = M ; prodM = trans(M) * M ;