Re: [R] slide show with R

From: max.marinucci <max.marinucci_at_ya.com>
Date: Wed 30 Mar 2005 - 12:47:28 EST

Why don't use R-Winedt package?
If you have Winedt installed on your machine, it does something similar to what you want.
Just highlight the command you want to execute from a text command file and then press the R-paste button.
Good luck!

M.



Massimiliano Marinucci
http://personales.ya.com/max_mar/
Ph.D Candidate in Economics
Fundamentos del Analisis Económico II
(Economía Cuantitativa)
Facultad de CC.EE.
Universidad Complutense Madrid
Campus de Somosaguas
Madrid - Spain

> Oops, I should have said that you can execute the text line via the
> construction:
>
> eval(parse(text=textline))
>
>
>
> -- Bert Gunter
> Genentech Non-Clinical Statistics
> South San Francisco, CA
>
> "The business of the statistician is to catalyze the scientific learning
> process." - George E. P. Box
>
>
>
> > -----Original Message-----
> > From: r-help-bounces@stat.math.ethz.ch
> > [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of
> > George_Heine@blm.gov
> > Sent: Tuesday, March 29, 2005 12:54 PM
> > To: R-Help
> > Subject: [R] slide show with R
> >
> >
> >
> >
> >
> > Trying to use R to build an interactive "slide show", to be
> > displayed on a
> > projector. The purpose of the presentation is to show how one could
> > construct a simple graph using R. It is meant as a general
> > overview rather
> > than as detailed instruction.
> >
> > For example, something like the following sequence of commands. At
> > lecture time, I want the interpreter to read these commands
> > one at a time
> > from a file, display and execute the command, (or two or
> > three commands)
> > and then wait for another prompt.
> >
> > pale.yellow="#ffff99"
> > par(bg=pale.yellow)
> > plot(c(0,2*pi),c(-1,1),type="n",ylab="",yaxt="n")
> > mirror<-function(t) { c(t,rev(2*max(t)-t)) }
> > z<-log(1:1000)/log(1000)
> > zz<-z*pi/2
> > zzz<-mirror(mirror(zz))
> > polygon(zzz,sin(25*zzz)*sin(zzz),border="blue")
> > polygon(zzz,sin(5*zzz)*sin(zzz),border="green")
> > polygon(zzz,sin(zzz),lwd=2)
> > points(zzz,rep(0,length(zzz)),col="red",pch="|")
> >
> >
> > Wrapping the following around each command works, sort of :
> >
> > a<-expression(<command>)
> > x<-readline(a)
> > eval(a)
> >
> > However, this doesn't work properly for the function
> > definition, and it
> > gets very clumsy to display two or three lines as a block and then
> > evaluate.
> >
> > Any help would be much appreciated.
> >
> >
> > <>=<>=<>=<>=<>=<>=<>=<>=<>=<>=<>
> > George Heine, PhD
> > Mathematical Analyst
> > National IRM Center
> > U.S. Bureau of Land Management
> > voice (303) 236-0099
> > fax (303) 236-1974
> > cell (303) 905-5382
> > pager gheine@my2way.com
> > <>=<>=<>=<>=<>=<>=<>=<>=<>=<>=<>
> >
> > ______________________________________________
> > 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
> >
>
> ______________________________________________
> 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
>
>



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 Wed Mar 30 13:02:47 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:57 EST