[R-SIG-Mac] Mac installation of R not liking lattice

Waichler, Scott R Scott.Waichler at pnl.gov
Wed Mar 18 23:33:54 CET 2009


The following code runs fine on Linux, but not on my Mac.  The error
message is given below, after the levelplot() call.  I was able to run
lattice functions previously on the Mac without any problems.  I don't
know what has changed.  I searched R-help and found a similar problem
that wasn't answered.  My Mac is running Xcode 2.5, in case that is
relevant.

> sessionInfo()
R version 2.8.1 (2008-12-22)
powerpc-apple-darwin8.11.1

locale:
C

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] sp_0.9-29         akima_0.5-1       TeachingDemos_2.3 gridBase_0.4-3
[5] lattice_0.17-20   chron_2.3-28      rimage_0.5-7


library(lattice)
# code from help(levelplot)
x <- seq(pi/4, 5 * pi, length = 100)
y <- seq(pi/4, 5 * pi, length = 100)
r <- as.vector(sqrt(outer(x^2, y^2, "+")))
grid <- expand.grid(x=x, y=y)
grid$z <- cos(r^2) * exp(-r/(pi^3))
png(file = "junk.png", width=8.5, height=11, units="in", res=75,
pointsize=12)  # letter
levelplot(z~x*y, grid, cuts = 50, scales=list(log="e"), xlab="",
         ylab="", main="Weird Function", sub="with log scales",
         colorkey = FALSE, region = TRUE)
+          colorkey = FALSE, region = TRUE)

Warning in grid.Call("L_textBounds", as.graphicsAnnot(x$label), x$x,
x$y,  :
  no font could be found for family "Arial"
Error in grid.Call("L_textBounds", as.graphicsAnnot(x$label), x$x, x$y,
:
  Polygon edge not found

Scott Waichler
Pacific Northwest National Laboratory
scott.waichler at pnl.gov



More information about the R-SIG-Mac mailing list