18.12.2012 Views

Embedding R Tutorial

Embedding R Tutorial

Embedding R Tutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Visual Basic .NET: Devices<br />

� devices are used the same way as in VB6<br />

� use “choose items“<br />

– check “StatconnectorCharacterDevice class“<br />

– check “StatconnectorGraphicsDevice class“<br />

� install the devices programmatically<br />

Dim lConnector As STATCONNECTORSRVLib.IStatConnector<br />

lConnector = New STATCONNECTORSRVLib.StatConnector<br />

lConnector.Init("R")<br />

lConnector.SetCharacterOutputDevice(charDev.GetOcx())<br />

lConnector.AddGraphicsDevice("gfx", gfxDev.GetGFX())<br />

lConnector.EvaluateNoReturn("cat(""Testing...\n"")")<br />

lConnector.EvaluateNoReturn("plot(1:100)")<br />

lConnector.EvaluateNoReturn("cat(""Done\n"")")<br />

lConnector.Close()

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

Saved successfully!

Ooh no, something went wrong!