From maechler at stat.math.ethz.ch  Wed Apr 23 10:52:18 2003
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Wed Apr 23 09:52:28 2003
Subject: [Rd] Re: Default value for title in postscript()
In-Reply-To: <20030422220800.GF14368@hortresearch.co.nz>
References: <20030422220800.GF14368@hortresearch.co.nz>
Message-ID: <16038.17970.797442.963291@gargle.gargle.HOWL>


[ This really should have gone to R-devel instead of R-help.
  I'm now diverting -- and please leave off "R-help" when replying again.
]

>>>>> "PaCo" == Patrick Connolly <p.connolly@hortresearch.co.nz>
>>>>>     on Wed, 23 Apr 2003 10:08:00 +1200 writes:

    PaCo> I like the fact that the postscript function enables
    PaCo> the possbiility of a more useful title than before.
    PaCo> However, I'd prefer the default to be the file name.

    PaCo> It's very simple for me to make my own postscript
    PaCo> function that does just that simply by setting title =
    PaCo> file.  I always use onefile = TRUE, so it always works
    PaCo> (so far).  However, I'm a little reluctant to do that
    PaCo> in case some future changes cause conflicts.  I've
    PaCo> been warned off tinkering with .Internal

    PaCo> My question is: What is the tidiest way of doing such
    PaCo> a thing?  Should I make a private function that calls
    PaCo> the standard postscript function, 

yes, your own function calling the standard high-level postscript(),
not some low-level {.Internal(), .Call(), .C() or .For..... } --
these all may be changed "without notice" !}

    PaCo> or should I go the whole hog and make an S4 type method to handle it?

    PaCo> Or would it be simpler for the standard function to be changed

certainly simpler for you.. ;-)

I tend to agree that a change might be useful --
For the new default, I'd actually go further and propose
something like (when file = "Rplots.ps")

   "Rplots.ps [from R 1.7.0]"

    PaCo> (assuming, of course, there aren't good reasons
    PaCo> against doing that)?

Unfortunately, there's a good reason: back-compatibility.
In spite of that, I do advocate a change.

Martin


[Rd] Re: Default value for title in postscript()
Martin Maechler