Re: [Rd] as.Date.character suggestion

2014-08-21 Thread peter dalgaard
Now done, for R-devel only. This can't be high priority. -pd On 21 Aug 2014, at 09:28 , peter dalgaard wrote: > > So I think Peter Langfelder is absolutely right, remove the default, which is > never used anyway, and possibly update the documentation with a more direct > reference to strptim

Re: [Rd] as.Date.character suggestion

2014-08-21 Thread peter dalgaard
On 21 Aug 2014, at 02:21 , Gabriel Becker wrote: > Ah, my mistake, I read too fast. (My code is also wrong, embarassingly). > > It seems like it's behavior when you pass it "" is simply a bug, then. > > Sorry for the noise, > > ~G > It's not a bug, it's just that you are at the mercy of str

Re: [Rd] as.Date.character suggestion

2014-08-20 Thread André Z . D . A .
Your arguments seems like: "we can't fix bugs or improve anything because this would break backward compatibility". If the described behavior should be important on many common cases, create a new function. Or new release, deprecated uses for some functions. Or maybe, add a new argument that al

Re: [Rd] as.Date.character suggestion

2014-08-20 Thread Gabriel Becker
Ah, my mistake, I read too fast. (My code is also wrong, embarassingly). It seems like it's behavior when you pass it "" is simply a bug, then. Sorry for the noise, ~G On Wed, Aug 20, 2014 at 4:59 PM, Peter Langfelder < peter.langfel...@gmail.com> wrote: > On Wed, Aug 20, 2014 at 4:52 PM, G

Re: [Rd] as.Date.character suggestion

2014-08-20 Thread Peter Langfelder
On Wed, Aug 20, 2014 at 4:52 PM, Gabriel Becker wrote: > Could do both to preserve bc... > > if(missing(format) || !nchar(format)) > No, the problem is that the function behaves differently when format is missing than when it equals its default. Removing this difference necessarily changes behavi

Re: [Rd] as.Date.character suggestion

2014-08-20 Thread Gabriel Becker
Could do both to preserve bc... if(missing(format) || !nchar(format)) ~G On Wed, Aug 20, 2014 at 1:50 PM, Peter Langfelder < peter.langfel...@gmail.com> wrote: > That would be my preferred solution, but it would break backwards > compatibility for format="", so others may disagree. > > Peter >

Re: [Rd] as.Date.character suggestion

2014-08-20 Thread Peter Langfelder
That would be my preferred solution, but it would break backwards compatibility for format="", so others may disagree. Peter On Wed, Aug 20, 2014 at 1:18 PM, Duncan Murdoch wrote: > On 20/08/2014, 4:11 PM, Peter Langfelder wrote: >> The default format="" in as.Date.character is supremely confusi

Re: [Rd] as.Date.character suggestion

2014-08-20 Thread Duncan Murdoch
On 20/08/2014, 4:11 PM, Peter Langfelder wrote: > The default format="" in as.Date.character is supremely confusing. The > help shows as.Date defined as > > ## S3 method for class 'character' > as.Date(x, format = "", ...) > > yet the function behaves very differently when format is not spec

[Rd] as.Date.character suggestion

2014-08-20 Thread Peter Langfelder
The default format="" in as.Date.character is supremely confusing. The help shows as.Date defined as ## S3 method for class 'character' as.Date(x, format = "", ...) yet the function behaves very differently when format is not specified and when it is specified to its default: as.Date("2012-