GeistHaus
log in · sign up

GitHub - coolbutuseless/callme: Easily compile inline C code for R

github.com

Easily compile inline C code for R. Contribute to coolbutuseless/callme development by creating an account on GitHub.

2 pages link to this URL
Counting Digits Quickly

When things run slower than we’d like in R we tend to reach for another, usually compiled, language, and move our code there. What if it “just happened”? What started out as a silly exploration of how to count digits ended up with a race to see which language does it fastest. Maybe some surprises here for some, maybe some bad implementations on my part - let’s find out.

0 inbound links website en rstatscc++fortranrustjuliapython
Wrapping C Code in an R Package

Your collaborator says to you “I have some code I’d like to distribute to people who will probably work in R most of the time. I don’t write R, but I write C. Can you package this up for me?” so you have a few options: re-write the code in R, package up the C code and make it available in R, or say no. I decided to try out the second of these, and this post details how I achieved that.

1 inbound link website en rstatsc