Hi Scott,
Your question is a FAQ:
http://cran.r-project.org/bin/windows/base/rw-FAQ.html#How-do-I-include-compiled-C-code_003f
also try reading:
http://cran.r-project.org/doc/manuals/R-exts.html#System-and-foreign-language-interfaces
If you want examples, try downloading the source code for some of the
packages on CRAN. Some of these contain C code which is compiled and
linked. The first time I did this, it took me quite a few hours
iterating between reading, looking at what others had done, and trying
things out. To me, that is just the nature of it. I doubt anyone can
provide a 'very quick script' that will just work for your particular
case. At that point, it is just an example of what you might do, in
which case just look at existing packages. Here is one (of many)
packages you could use:
http://cran.r-project.org/web/packages/SoDA/index.html
it is kind of a nice choice, I think, because it accompanies the book,
Software for Data Analysis by John Chambers, so it is sort of geared
towards teaching.
Cheers,
Josh
On Fri, Feb 3, 2012 at 2:24 AM, ScottM <scott.mcgrane at abdn.ac.uk>
wrote:> Hello,
>
> Computing language really isn't a strength of mine - I'm trying to
run a
> model which has been passed on to me and I need to convert it into a dll,
so
> it is usable in R, but I'm finding the documentation very hard to
follow.
> Could someone possibly provide me a very quick script to do this using the
> Command Prompt function (I'm using Windows 7). ?Details as follow:
>
> C:\Users\Scott\Desktop\model_gir\C_source-code>
>
> The above is the folder where the .c file (titled model7all.c) is stored -
> how do I convert this to a .dll format?
>
> Any help GREATLY appreciated.
>
> Cheers,
>
> S.
>
>
> --
> View this message in context:
http://r.789695.n4.nabble.com/Compilation-of-C-into-dll-tp4354209p4354209.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
--
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/