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

2010-03-08 Thread alex46015
I fixed the problem, it is related to my C++ code when I change main function to gneral function. You gave a great help! Thank you! Simon. have a good night! Alex __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

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

2010-03-08 Thread Simon Urbanek
want to access the values as fn[0], fn[1], fn[2] and par[0], par[1], par[2], .. etc. Cheers, Simon Thank you so much . You save me a tons of time, Alex --- On Mon, 3/8/10, Simon Urbanek wrote: From: Simon Urbanek Subject: Re: [Rd] for help on building a R package with several R functio

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

2010-03-08 Thread alex46015
ot;foo" is the name of your package. > > > Where I can make sure it successful and I can use > .C("tranptest",) in R before the wholepackage > installed? > > > > It's really simple - you don't need to install the package > to test it. Ass

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

2010-03-08 Thread Simon Urbanek
Dirk, he was not asking about Rcpp originally - he was asking about C++. He seems to be reluctant to use Rcpp due to the complexities involved (for which I don't blame him) so going back to simple C++ basics of R- ext (which is what he was using in his example) is really R-devel topic I th

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

2010-03-08 Thread Simon Urbanek
same directory: R # load the library you just compiled dyn.load("foo.so") # test your code .C("tranptest", c("file1", "file2"), as.double(1,2,3,4)) Cheers, Simon Alex --- On Mon, 3/8/10, Romain Francois wrote: From: Romain Francois Subject: Re: [Rd

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

2010-03-08 Thread Dirk Eddelbuettel
Alex, Can you _please_ stop spamming r-devel? Romain and I repeatedly pointed the existence of the rcpp-devel list out to you. Please consider using it. There are existing packages that use what you want to try use. I find it beneficial to start from a _working example_. Take e.g. the earthmov

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

2010-03-08 Thread Romain Francois
e.skeleton adds a useDynLib directive to the NAMESPACE so you should be fine. Thank you so much! > Alex --- On Mon, 3/8/10, Romain Francois wrote: From: Romain Francois Subject: Re: [Rd] for help on building a R package with several R function and a bunch of c, c++ To: alex46...@yahoo.

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

2010-03-08 Thread alex46015
sure it successful and I can use .C("tranptest",) in R before the wholepackage installed? Thank you so much! Alex --- On Mon, 3/8/10, Romain Francois wrote: > From: Romain Francois > Subject: Re: [Rd] for help on building a R package with several R function &

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

2010-03-08 Thread alex46015
Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I tried to build R package which include this C++ program and several other R functions. These R functions here are independent of c++ code. I prefer to def

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
ce between my first name and last name..  All I tried are on my own PC at home , I will tryon other  PC in my office.  Do you have suggestion?. Thanks,  Alex --- On Sun, 3/7/10, Romain Francois wrote: From: Romain Francois Subject: Re: [Rd] for help on building a R package with seve

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

2010-03-07 Thread alex46015
, 3/7/10, Romain Francois wrote: From: Romain Francois Subject: Re: [Rd] for help on building a R package with several R function and a bunch of c, c++ To: alex46...@yahoo.com Cc: "Dirk Eddelbuettel" , r-devel@r-project.org Date: Sunday, March 7, 2010, 3:59 AM On 03/06/2010 03:27

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
el Subject: Re: [Rd] for help on building a R package with several R function and a bunch of c, c++ To: alex46...@yahoo.com Cc: r-devel@r-project.org Date: Friday, March 5, 2010, 8:25 PM On 5 March 2010 at 13:15, alex46...@yahoo.com wrote: | Hope I can get quick help from here, I have a bunch

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

2010-03-05 Thread alex46015
lding a R package with several R function and a bunch of c, c++ To: alex46...@yahoo.com Cc: r-devel@r-project.org Date: Friday, March 5, 2010, 8:25 PM On 5 March 2010 at 13:15, alex46...@yahoo.com wrote: | Hope I can get quick help from here, I have a bunch of c, c++ included main functio

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

2010-03-05 Thread Dirk Eddelbuettel
On 5 March 2010 at 13:15, alex46...@yahoo.com wrote: | Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I tried to build R package which include this C++ program and several other R functions. These R fun

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

2010-03-05 Thread alex46015
Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I tried to build R package which include this C++ program and several other R functions. These R function here are independent of c++ code. I prefer to def