Re: [Rd] for help on building a R package with several R function and a bunch of c, c++

2010-03-07 Thread Romain Francois
On 03/06/2010 03:27 AM, alex46...@yahoo.com wrote: I think the first question should be how to build a R function to call a bunch of C ,C++ which include one main program, and a makefile. My goal to build a R package will be next step. You should jump straight to making a package. You are

[Rd] duplicate STRSXP : shallow copy ?

2010-03-07 Thread Romain Francois
Hello, As this little program illustrates, duplicating a STRSXP does not seem deep enough. require( inline ) fx - cfunction( signature( x = character), ' SEXP y = PROTECT( duplicate( x ) ); int n = LENGTH(x); int nc = 0 ; char* p = 0 ; for( int i=0;

Re: [Rd] duplicate STRSXP : shallow copy ?

2010-03-07 Thread Romain Francois
Hello, I understand now that this is very intended after reading: http://cran.r-project.org/doc/manuals/R-ints.html#The-CHARSXP-cache So we are not supposed to modify a CHARSXP character by character. Sorry for the noise. Romain On 03/07/2010 10:48 AM, Romain Francois wrote: Hello, As

[Rd] application to mentor syrfr package development for Google Summer of Code 2010

2010-03-07 Thread James Salsman
Per http://rwiki.sciviews.org/doku.php?id=developers:projects:gsoc2010 -- and http://rwiki.sciviews.org/doku.php?id=developers:projects:gsoc2010:syrfr -- I am applying to mentor the Symbolic Regression for R (syrfr) package for the Google Summer of Code 2010. I propose the following test which an

Re: [Rd] for help on building a R package with several R function and a bunch of c, c++

2010-03-07 Thread alex46015
Thank you for your help. So far what I did  on my notebook as follows. My OS is windows7.   I downloaded Rcpp windows version, and load library(Rcpp) then.   1, Change main funnction to f1.cpp, remove makefile. 2 ,run Rcpp.package.skeleton(name=test,list=c(rec1.R,rect2.R)) 3, edit  /man, /R,

Re: [Rd] application to mentor syrfr package development for Google Summer of Code 2010

2010-03-07 Thread Chidambaram Annamalai
It's been a while since I proposed syrfr and I have been constantly in contact with the many people in the R community and I wasn't able to find a mentor for the project. I later got interested in the Automatic Differentiation proposal (adinr) and, on consulting with a few others within the R

Re: [Rd] application to mentor syrfr package development for Google Summer of Code 2010

2010-03-07 Thread James Salsman
Chillu, If I understand your concern, you want to lay the foundation for derivatives so that you can implement the search strategies described in Schmidt and Lipson (2010) -- http://www.springerlink.com/content/l79v2183725413w0/ -- is that right? It is not clear to me how well this generalized

Re: [Rd] application to mentor syrfr package development for Google Summer of Code 2010

2010-03-07 Thread Chidambaram Annamalai
If I understand your concern, you want to lay the foundation for derivatives so that you can implement the search strategies described in Schmidt and Lipson (2010) -- http://www.springerlink.com/content/l79v2183725413w0/ -- is that right? Yes. Basically traditional naive error estimators or

Re: [Rd] for help on building a R package with several R function and a bunch of c, c++

2010-03-07 Thread Romain Francois
Hi, Yes, the problem is with spaces in path names. This has been fixed and will appear as Rcpp 0.7.8 in a few days. If you are in a rush, you can build it from svn, or quote the path that is returned from CxxFlags. Feel free to get back to us with more questions, although I'd encourage

Re: [Rd] application to mentor syrfr package development for Google Summer of Code 2010

2010-03-07 Thread James Salsman
Chillu, I meant that development on both a syrfr R package capable of using either F statistics or parametric derivatives should proceed in parallel with your work on such a derivatives package. You are right that genetic algorithm search (and general best-first search --