[Rd] creating custom I/O for R

Prof Brian D Ripley ripley@stats.ox.ac.uk
Fri, 29 Sep 2000 07:37:03 +0100 (BST)


On Thu, 28 Sep 2000, Don Wingate wrote:

> Dear R developers,
> 
> I am building an ActiveX Com wrapper for R. I have successfully implemented
> an Evaluate function using rproxy_impl.c and rtest.c as examples. The Com
> object as it stands at the moment is similar to Thomas Baier's automation
> server StatConnectorSrv.exe except that it does not use the Proxy. My goal
> it to include a couple of activeX controls in the library: One to provide a
> terminal-like interface to R and the other to provide a window for graphics
> output.
> 
> These two activeX components will serve the exact functions as the
> corresponding components of RGui.exe. The difference (and great benefit) is
> that as ActiveX components, they can be placed inside an ActiveX container
> (like a VB form) and manipulated as an application developer sees fit.
> 
> My questions involve how to accomplish these goals:
> 
> 1) Graphics.
> 
> a. For the graphics output, is there a way to pass R a Windows GDI
> (graphics) device to draw with? (This would be a very helpful feature!)

Do you mean draw on?  If so, no, but the devga device could be modified to
do so.

> b. If not, is there a way to get a metafile and/or a bitmap of a plot
> without having first displayed the plot in the standard window?

Use a win.metafile device. See ?windows. See also ?bmp.

> 2) Terminal
> 
> a. Is possible to quickly explain the mechanism provided by the functions
> pointed at by the members WriteConsole and ReadConsole of the struct
> structRstart?

src/unix/system.txt is the documentation.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._