[R] R integration with Microsoft Powerpoint

From: <khobson_at_fd9ns01.okladot.state.ok.us>
Date: Sat 02 Jul 2005 - 05:11:31 EST

>...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.

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:

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 02 05:13:38 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:11 EST