18.12.2012 Views

Embedding R Tutorial

Embedding R Tutorial

Embedding R Tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

R calls Visual Basic 6 (1/2)<br />

� create ActiveX EXE or ActiveX DLL project<br />

– EXE creates and outproc server, DLL an inproc server<br />

� create a new public class<br />

– ProgId is ProjectName.ClassName<br />

� prepare for callbacks to R<br />

– add a reference to RCOM 1.0 Type Library<br />

– define a public property “Connector“ of type<br />

InternalConnector, define an accessor function for the<br />

property (“property let“, not “property set“)<br />

� define methods and functions<br />

� compile & deploy<br />

– use regsvr32.exe to register for ActiveX DLL projects<br />

(regvr32.exe /u unregisters)<br />

– use mySrv.exe /RegServer to register ActiveX EXE projects<br />

– ActiveX DLL (mySrv.exe /UnregServer unregisters)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!