R wrapper for the C function test_func