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

From: <alex46015_at_yahoo.com>
Date: Fri, 05 Mar 2010 18:27:44 -0800 (PST)


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.
 

I read Rcpp , I am not sure if  RcppResultSet can solve my problem or other function. Once I make sure it work I need ask UNIX adminstrator to install it.
 

I think it shouldn't be very complex,  as I know to build a R function easy with one C function.
 

Thanks you for yout attention!
 

Alex

From: Dirk Eddelbuettel <edd_at_debian.org> Subject: Re: [Rd] for help on building a R package with several R function and a bunch of c, c++ To: alex46015_at_yahoo.com
Cc: r-devel_at_r-project.org
Date: Friday, March 5, 2010, 8:25 PM

On 5 March 2010 at 13:15, alex46015_at_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 function here are independent  of c++ code. I prefer to define one R function to call this c++ program (main function). 
| 
| I know how to build R package with just R function, but I don't know how to handle those c++ c code after I copied those  code  in ./src, I am reading manual "Writing R Extensions" , but I did n't catch the key point . Do you know any easy way to do it? ,

When you asked _that exact same question_ this morning on r-help, you got the following answer:

   From: Whit Armstrong <armstrong.whit_at_gmail.com>
   To: alex46015_at_yahoo.com
   Cc: r-help@r-project.org
   Subject: Re: [R] for help on building a R package with several R function and a bunch of c, c++
   Date: Fri, 5 Mar 2010 10:33:54 -0500
   
   Pick up Rcpp, make your life easier.
   
   http://dirk.eddelbuettel.com/code/rcpp.html
   
   -Whit
 
   On Fri, Mar 5, 2010 at 9:19 AM,  <alex46015_at_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.  R function here are independent  c++ code. I prefer to define one R function to call this c++ program.
   >
   > Do you know any easy way to do it? I am reading manual "Writing R Extensions", I didn't catch the key point. I know how to build R package with just R function,  If I put all c++ code and makefile in /src...what I need do?
   >
   > Thank you in advance!
   >
   > Alex

Now, can you let us know

    a) what part of the answer was unclear to you, and

    b) what made you think you needed to repost _the identical question_ here

| Thank you in advance!

You're welcome.

Dirk

| Alex
| 
| ______________________________________________
| R-devel_at_r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel

-- 

  Registration is open for the 2nd International conference R / Finance 2010
  See http://www.RinFinance.com for details, and see you in Chicago in April!
[[alternative HTML version deleted]]

______________________________________________ R-devel_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Received on Sat 06 Mar 2010 - 02:31:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 07 Mar 2010 - 10:00:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive