From S.Ellison at lgc.co.uk  Wed Jun  4 13:57:05 2008
From: S.Ellison at lgc.co.uk (S Ellison)
Date: Wed, 04 Jun 2008 12:57:05 +0100
Subject: [Rd] savePlot() no longer automatically adds an	extension	to
	the	filename.
Message-ID: <s8469131.004@tedmail.lgc.co.uk>

Apologies; in my last post (below) I should have distinguished between
action on the current patch and suggested action for the future.

I bow to Duncan on the fate of the current patch, as he's managing it.

The suggestions of an extra savePlot parameter or a wrapper function
with extension default were suggestions for possible future tidying-up
in subsequent releases.

Steve E

>>> "S Ellison" <S.Ellison at lgc.co.uk> 06/04/08 12:44 PM >>>
>>> Michael Prager <Mike.Prager at noaa.gov> 06/04/08 4:28 AM >>>
>There is much to be said for consistency (across platforms and 
>functions) and stability (across versions) in software.

I could not agree more. But while consistency  is an excellent reason
for making the patch consistent across platforms, it doesn't help decide
what the consistent behaviour should be. It is as strong an argument for
retaining the original behaviour at 2.6.x as for keeping a change. 

As to filename extensions or their lack; in practice, RGui.exe addds a
defult Rdata extension on saving a workspace via the GUI, and so does
saving history, so we already have overwriteable default extensions for
those purposes even though the command line behaviour doesn't do that. 
And it genuinely does help, which is my main motivation here.

The main advantage of the present patch is that it delivers _most_ of
the optional behaviours missing from both 2.6.2 and 2.7.0 without adding
an extra parameter. But it isn't the best that could be done. If there
is a platform-independent way of keeping the default extension-by-type
and allowing the option of removing it entirely (in other words, an
extra parameter to savePlot) I'd personally see that as a better way
forward than the present patch. 
An alternative might be to keep the 2.7.0 savePlot and define a new
convenience function (SavePlot, say, or save.plot for extra dottiness) 
which provides the wrapper. It would have impact on legacy code, but it
is a lot easier to change a function name throughout legacy code than to
change supplied parameters.

In the mean time, consistency arguments would indicate that the present
patch should be applied to all platforms if at all.

Steve E

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:16}}



[Rd] savePlot() no longer automatically adds an extension to the filename.
S Ellison