R call C functions