Skip to contents

Create a reusable FFI function wrapper

Usage

ffi_function(name, return_type, ..., library = NULL, na_check = TRUE)

Arguments

name

Character name of the function

return_type

FFIType for return value

...

FFIType objects for arguments

library

Character name of library (optional)

na_check

Logical; if TRUE (default), check for NA values and error if found. Set to FALSE to skip NA checking for better performance (at your own risk).