[R] C# DLL Library
romain at r-enthusiasts.com
Tue Mar 16 11:56:46 CET 2010
disclaimer: I don't know C# at all and how it might connect to c++, etc ...
For an introductory ride about Rcpp, you can consult the
Rcpp-introduction vignette which you can download from the cran page of
Rcpp or if you have it installed, you can just do:
> vignette( "Rcpp-introduction", package = "Rcpp" )
For semi-self-explanatory code examples, you can consult our unit tests:
> system.file( "unitTests", package = "Rcpp" )
For more questions, we have a dedicated mailing list:
Le 16/03/10 11:43, Jeremie Smaga a écrit :
> 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
> 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?
> On Tue, Mar 16, 2010 at 5:23 PM,<Richard.Cotton at hsl.gov.uk> wrote:
>>> I would like to develop a core library which I will be using both from R
>>> 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#).
>> 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.
>> Mathematical Sciences Unit*
>> r-help-bounces at 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
>>> 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
>>> I still have not implemented anything, so if it is only a matter of
>>> 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?
>>> Jeremie Smaga
Professional R Enthusiast
+33(0) 6 28 91 30 30
|- http://tr.im/OIXN : raster images and RImageJ
|- http://tr.im/OcQe : Rcpp 0.7.7
`- http://tr.im/O1wO : highlight 0.1-5
More information about the R-help