This is mostly a guess... At the end of January, your script succeeded. Your OS was "built Sun Feb 23 05:14:37 PST 2014." Your script failed on Feb 26. You probably had not made any changes to R between the end of January and Feb 26 (I don't see any mention of having done so, and R does not update itself -- unless you have some OS level package manager that does it for you; I wouldn't know about that).
At this point, I'd wonder if the OS update on 2/23 changed come libraries that R relies on for png graphics. Perhaps you need to rebuild R, so that it uses the changed/updated OS libraries. Hopefully that OS update did not completely remove libraries that R depends on for png. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 2/25/14 10:36 AM, "David Wolfskill" <r...@catwhisker.org> wrote: >Since ... hmmm.. May 2012, I've had a cron-initiated script running >monthly to extract some data and generate some numeric tables and >plots (in PNG format). > >In its "normal" mode, the script automagically sends its results >to a small handful of managers on the first of each month. Out of >self-defense, I set up a "preview" run several days before the real >one; the preview doesn't go quite as high in the management chain. > >This morning, I found a message in my mailbox from such a preview run: > >| Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, > : >| unable to start device PNG >| Calls: gen_build_histogram -> png >| In addition: Warning message: >| In png(filename = fn, height = height, width = width, units = "in", : >| unable to open connection to X11 display '' >| Execution halted > >[This was running R-3.0.2_1 in FreeBSD/amd64 9.2-STABLE >r262323M/262357:902506, built Sun Feb 23 05:14:37 PST 2014.] > >I admit that I haven't been following changes in R very closely -- >the script had been running reliably for over a year, and it's not >one of the fires I've been fighting recently. > >But the implication -- that png() was suddenly[1] changed so that it >requires the ability to connect to an X11 display -- seemed peculiar >enough that I would have thought a quick search would lead me to soe >discussion of a change of this magnitude, rationale, and what folks >might do to mitigate the effects. > >Based on one message I found (from 02 Mar 2008!), I did take a look at >"help png" output, and saw the reference there to bitmap(). I tried ... >hacking ... my functions to use "bitmap(fn, ...)" instead of >"png(filename = fn, ...)", but that looks as if it's leading me astray: > >| Error in strwidth(legend, units = "user", cex = cex, font = text.font) >: >| family 'mono' not included in postscript() device >| Calls: gen_build_histogram -> legend -> strwidth >| Execution halted > > >So... what's someone who wants to use R to generate PNG-format files >from an environment that is bereft of X11 to do? > > >1: "Suddenly" because it *had* been working up to 01 Feb 2014, at least. > >[I'll be happy to sumamrize responses that aren't sent to the list.] > >Peace, >david >-- >David H. Wolfskill r...@catwhisker.org >Taliban: Evil cowards with guns afraid of truth from a 14-year old girl. > >See http://www.catwhisker.org/~david/publickey.gpg for my public key. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.