Re: [Rd] c.POSIXct

2010-08-19 Thread Vitaly S.
Spencer Graves writes: >I'm with Gabor on this. I naively would not expect c() to strip > attributes generally, and I've been > surprise more than once to find the time zone attribute stripped when I did > not expect that. > > > Might it make sense to add an argument like "keepAt

Re: [Rd] c.POSIXct

2010-08-19 Thread Gabor Grothendieck
On Thu, Aug 19, 2010 at 12:15 PM, Spencer Graves wrote: >  Hi, Gabor, et al.: > > >      I'm suggesting adding "checkAttributes" to "ca", NOT to "c". > Yes, that would be a good idea. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/l

Re: [Rd] c.POSIXct

2010-08-19 Thread Spencer Graves
Hi, Gabor, et al.: I'm suggesting adding "checkAttributes" to "ca", NOT to "c". Spencer On 8/19/2010 8:50 AM, Gabor Grothendieck wrote: On Thu, Aug 19, 2010 at 11:43 AM, Spencer Graves wrote: Hi, Gabor, Paul, et al.: For classes that did not supply a "ca" method, I

Re: [Rd] c.POSIXct

2010-08-19 Thread Gabor Grothendieck
On Thu, Aug 19, 2010 at 11:43 AM, Spencer Graves wrote: >  Hi, Gabor, Paul, et al.: > > >      For classes that did not supply a "ca" method, I'd rather see the > default being to start with the corresponding  "c" method followed by an > effort to preserve attributes to the maximum extent feasible

Re: [Rd] c.POSIXct

2010-08-19 Thread Spencer Graves
Hi, Gabor, Paul, et al.: For classes that did not supply a "ca" method, I'd rather see the default being to start with the corresponding "c" method followed by an effort to preserve attributes to the maximum extent feasible. I'm not sure the best defaults, but at the moment, I would

Re: [Rd] c.POSIXct

2010-08-19 Thread Gabor Grothendieck
On Thu, Aug 19, 2010 at 10:16 AM, Paul Gilbert wrote: > I used to get caught by this c() behaviour often, but now I do expect it to > drop attributes. I think it would break many things if you change it, and > force people to write different code when they really do want to drop > attributes. W

Re: [Rd] c.POSIXct

2010-08-19 Thread Paul Gilbert
new function, ca() maybe? Paul >-Original Message- >From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r- >project.org] On Behalf Of Gabor Grothendieck >Sent: August 18, 2010 6:23 PM >To: r-devel@r-project.org >Subject: Re: [Rd] c.POSIXct > >No one answere

Re: [Rd] c.POSIXct

2010-08-18 Thread Spencer Graves
I'm with Gabor on this. I naively would not expect c() to strip attributes generally, and I've been surprise more than once to find the time zone attribute stripped when I did not expect that. Might it make sense to add an argument like "keepAttributes=FALSE" to the "c" function

Re: [Rd] c.POSIXct

2010-08-18 Thread Gabor Grothendieck
On Wed, Aug 18, 2010 at 10:34 PM, Simon Urbanek wrote: > > On Aug 18, 2010, at 6:23 PM, Gabor Grothendieck wrote: > >> No one answered this so I submitted it to the bugs system and there I >> got the response that it is documented behavior; however, whether its >> documented or not is hardly the p

Re: [Rd] c.POSIXct

2010-08-18 Thread Simon Urbanek
On Aug 18, 2010, at 6:23 PM, Gabor Grothendieck wrote: > No one answered this so I submitted it to the bugs system and there I > got the response that it is documented behavior; however, whether its > documented or not is hardly the point -- its undesirable that tzone is > lost when using c. >

Re: [Rd] c.POSIXct

2010-08-18 Thread Gabor Grothendieck
No one answered this so I submitted it to the bugs system and there I got the response that it is documented behavior; however, whether its documented or not is hardly the point -- its undesirable that tzone is lost when using c. On Thu, Aug 12, 2010 at 11:33 AM, Gabor Grothendieck wrote: > Curre

[Rd] c.POSIXct

2010-08-12 Thread Gabor Grothendieck
Currently if x1 and x2 are POSIXct then c(x1, x2) will not have a tzone attribute even if x1 or x2 or both do but it should. This could be fixed with the following c.POSIXct: c.POSIXct <- function (..., recursive = FALSE) { tzones <- lapply(list(...), attr, which = "tzone") length