Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (16 sloc) 256 Bytes

Compile C code

# is gcc there?
Sys.which('gcc')

Does engine = 'c' work?

void square(double *x) {
  *x = *x * *x;
}

Test the square() function:

.C('square', 9)
.C('square', 123)