Hello

*I need visual basic in front end and R in background.* For this I installed
R-(D)COM server <http://www.sciviews.org/_rgui/projects/RDcom.html>. I am
developing for winXP OS. Is this the best option?



I have successfully implemented in data transfer part, but I have some query
to graphics part.



Consider the example "RSrv250S\Server\samples\Graphics"

The StatConnectorGraphicsDevice control is working fine but image quality is
not so good. This may be due to window size default is (7,7) in R – I, guess

 _____________

  Dim sconn As StatConnector

  Dim gfxdev As ISGFX



  Set sconn = New StatConnector

  sconn.Init "R"



  Set gfxdev = Gfx1.GetGFX

  sconn.AddGraphicsDevice "dev1", gfxdev

  sconn.EvaluateNoReturn "plot(sin(1:10))"

  sconn.Close

 ___________________



*I tried to change window size by*



sconn.AddGraphicsDevice "dev1", gfxdev

*sconn.EvaluateNoReturn "windows(4,4)"*

 sconn.EvaluateNoReturn "plot(sin(1:10))"



But this has no effect, rather this cause a *new R graphics* window to
popup.



I thought of using a image control instead of the
StatConnectorGraphicsDevice control.

I use

'''''''''''''''''''''''''''''''''''''''''''''''''''''

  Dim sconn As StatConnector

  Set sconn = New StatConnector

  sconn.Init "R"



* sconn.EvaluateNoReturn "windows(4,4)"*

  sconn.EvaluateNoReturn "plot(sin(1:10))"

 *conn.EvaluateNoReturn "savePlot(file="""", type = ""wmf"")"*



  sconn.Close



*Image1.Picture = Clipboard.GetData(vbCFMetafile)*

* *

*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*

This is working fine with a popup of R graphic window.



I want to get this done in background. There may be simple solution to keep
R graphics window silent, I am not able to do this.

Any help on this matter is appreciated


-- 
Jagadish Prasad Patra
Research Scholar
Agricultural & Food Engineering Department
IIT Kharagpur
India
http://jagadish.patra.googlepages.com
_______________________________________________
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at

Reply via email to