Skip to content
Prev 5747 / 15075 Next

Calling Objective C/Cocoa code from R

Guillaume,
On Mar 12, 2009, at 14:35 , Guillaume Chapron wrote:

            
ObjectiveC uses the same ABI as C (it's in fact just a very thin layer  
above C), so you can safely use R's C API. In addition, if you want to  
instantiate ObjC objects and pass messages (without going through  
function calls), you can use one of the ObjC packages around: Cocoa (http://www.rforge.net/Cocoa/ 
  ) or RObjectiveC (http://www.omegahat.org/RObjectiveC/ ).

All of the above assumes that you want to use that tool as a library  
(R supports ObjC in packages out of the box). If you want to just  
invoke it on the command line, you can use the regular system()  
interface.

Cheers,
Simon