[R] R integration with Microsoft Powerpoint
khobson@fd9ns01.okladot.state.ok.us
khobson at fd9ns01.okladot.state.ok.us
Fri Jul 1 21:11:31 CEST 2005
>...snip...In PowerPoint, click the menu item Insert | Object | Create and
browse to
and select the cars.r file. ...snip...
In the previous post snippet above, replace cars.r with cars.bat.
To run the cars.bat program via VBA, I would typically insert a button. To
do so in PowerPoint, right click the toolbar, select Control Toolbar and
then click the button icon. Right click and drag and draw the button onto
the slide. Double click the button object and add code something like:
Private Sub CommandButton1_Click()
Shell ("c:\myfiles\r\cars.bat")
End Sub
When passing input to a program like R, I typically use VBA's Input() and
write the results to a TXT file. This is then easily read into R.
mailto:khobson at odot.org
Kenneth Ray Hobson, P.E.
Oklahoma DOT - QA & IAS Manager
200 N.E. 21st Street
Oklahoma City, OK 73105-3204
(405) 522-4985, (405) 522-0552 fax
Visit our website at:
http://www.okladot.state.ok.us/materials/materials.htm
More information about the R-help
mailing list