[R] lattice graphics and source()

2007-02-13 Thread Dongfeng LI
Hi, I am trying the lattice graphics in R. Let's say, such a little experiment in file myprog.r: f - function(){ x - 1:10 y - x^2 xyplot(y ~ x) } f() Then I run the program: source(myprog.r) but nothing happens. Manully run f() at the command line: f() then the figure is shown.

Re: [R] lattice graphics and source()

2007-02-13 Thread Marc Schwartz
On Tue, 2007-02-13 at 16:44 -0800, Dongfeng LI wrote: Hi, I am trying the lattice graphics in R. Let's say, such a little experiment in file myprog.r: f - function(){ x - 1:10 y - x^2 xyplot(y ~ x) } f() Then I run the program: source(myprog.r) but nothing happens.