[R] postscript(), used from a pre R-2.6.0 workspace
John Maindonald
john.maindonald at anu.edu.au
Tue Oct 30 10:37:18 CET 2007
I find that if start R-2.6.0 in a workspace with no .RData file,
load one of my workspaces from R-2.5.1 or earlier into R-2.6.0,
and then before doing anything else type postscript(file="z.ps"),
I get::
> ls()
character(0)
> load(url("http://www.maths.anu.edu.au/~johnm/r/test5.RData"))
> postscript(file="z.ps")
Error in postscript(file = "z.ps") : Invalid font type
In addition: Warning messages:
1: closing unused connection 3 (gzcon(http://www.maths.anu.edu.au/~johnm/r/test5.RData)
)
2: In postscript(file = "z.ps") :
font family not found in PostScript font database
3: In postscript(file = "z.ps") :
font family not found in PostScript font database
Or R may be started in a workspace with such a .RData file,
or with a .RData file from R-2.5.1 or earlier.
This behavior persists even if I take such an image file, load it,
clear the workspace, and save it. An instance of such a .RData
file has the url:
http://www.maths.anu.edu.au/~johnm//r/test5.RData
It makes no difference whether I load the file into R-2.6.0
on a MacOS X or Windows system, or whether I use the current
R-patched (2007-10-27 r43288). I do not know whether the
source of the original .RData file matters, or how it may depend
on what I have done in that earlier workspace.
For moving my .RData files across without messing up use of
postscript() [or pdf()], a workaround is to dump the contents of the
earlier workspace, then start R in a working directory whose
.RData file, if any, has the proper R-2.6.0 pedigree, and source
the dumped file. I do not want to have to directly run the function
that creates the database each time I start a session.
Has anyone else hit this?
John Maindonald email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473 fax : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.
More information about the R-help
mailing list