[R] levelplot and source() problems

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jun 13 14:45:30 CEST 2006


On Tue, 13 Jun 2006, Niels Vestergaard Jensen wrote:

> I have been using levelplot but have had trouble calling it inside
> functions - something seems to go wrong when it's not called directly from
> the R command prompt. Simplest reproducible example:
>
> $ R --vanilla
>> library(lattice)
>> levelplot(matrix(1:4,2,2))
>
> - This gives a nice plot in soothing pastel colors.
>
> Now, with a file lptest.r containing 2 lines:
>
> library(lattice)
> levelplot(matrix(11:14,2,2))
>
>> source("lptest.r")
>
> Gives nothing.
>
> I've tried closing all devices and setting it with X11() and pdf().
>
> Am I missing something here or should I file a bug report? I'm running R
> Version 2.2.1 (2005-12-20 r36812) on Red Hat, lattice library v. 0.12-11

See R FAQ Q7.22.  (Please don't file a bug report on an FAQ using an old 
version of R: the posting guide did instruct you to upgrade before 
posting.)

-- 
Brian D. Ripley,                  ripley at 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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list