Hello Richard,

Thanks for the tips.

I was aware of the R(D)COM. In the last public version, there is now splash
screen appearing which is kind of boring so I think I need to buy it or
something.

Anyway, I think the idea was to create a common CORE library that can be
used from C# and from R. So I think I'll have a look at RCPP which looks to
be the best solution.

Have you tried it already? Do you know any good tutorial for this package?

Thanks,

Jeremie


On Tue, Mar 16, 2010 at 5:23 PM, <Richard.Cotton@hsl.gov.uk> wrote:

>
> > I would like to develop a core library which I will be using both from R
> and
> > from C#.
>
> > - Writing the DLL freely in C# and then create a wrapper?
> > - Writing it in C++
> > - Writing it in C, the other options are really not good ideas.
>
> As far as I know, there currently is no way to call .NET code from R.  If
> you want a library that can be called from both a .NET environment and from
> R, then writing it in C or C++ is likely your best bet.  Alternatively, you
> can run R code from within .NET using the rcom package.  There's an example
> in F# here (what's true for F# is true for C#).
>
>
> http://cs.hubfs.net/blogs/thepopeofthehub/archive/2007/11/06/FSharpWithR.aspx
>
> See ?.C for calling C code, and the rcpp package for an interface to C++
> code.  Choosing between those two languages mostly depends on whether on not
> your library is especially suited to object oriented programming or not.
>
> Regards,
> Richie.
>
> Mathematical Sciences Unit*
> **HSL* <http://www.hsl.gov.uk/contact-us.htm>
>
>
> r-help-bounces@r-project.org wrote on 16/03/2010 09:04:54:
>
>
> > Good afternoon everybody,
> >
> > I am sorry, this question might look trivial to some of you, but I read
> > quite a lot of stuff about package creation and I would like a bit of you
> > advices.
> >
>
> >
> > I read that it was possible to import DLL to R.
> >
> > The thing is, I am not sure that the DLL created with C# will be
> compatible.
> > I still have not implemented anything, so if it is only a matter of
> method
> > signatures, I can make sure everything fits.
> >
> > Otherwise, I could use a C++ DLL, but I don't know if it is really
> > recommended. (In fact, I would love to be able to develop it in Visual
> > Studio because it is where I developed the rest of my platform).
> >
> > So, what would you advise?
> >
>
> >
> > Thanks,
> >
> > --
> > Jeremie Smaga
>
> >
> >    [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>  ------------------------------
> *ATTENTION:*
>
> This message contains privileged and confidential information intended for
> the addressee(s) only. If this message was sent to you in error, you must
> not disseminate, copy or take any action in reliance on it and we request
> that you notify the sender immediately by return email.
>
> Opinions expressed in this message and any attachments are not necessarily
> those held by the *Health and Safety Laboratory <http://www.hsl.gov.uk/>*or any person connected with the organisation, save those by whom the
> opinions were expressed.
>
> Please note that any messages sent or received by the *Health and Safety
> Laboratory <http://www.hsl.gov.uk/>* email system may be monitored and
> stored in an information retrieval system.
>
> ------------------------------
> Think before you print - do you really need to print this email?
> ------------------------------
>
>   ------------------------------
>
> Scanned by *MailMarshal* - Marshal's comprehensive email content security
> solution. Download a free evaluation of MailMarshal at www.marshal.com
>
> **
> ------------------------------
>



-- 
Jeremie Smaga

	[[alternative HTML version deleted]]

