Displaying 20 results from an estimated 6000 matches similar to: "format.POSIXlt drops characters following percent sign (PR#8976)"
2006 Jun 13
1
format.POSIXlt drops characters following percent sign (PR#8975)
Full_Name: Jeff Hallman
Version: 2.3.1
OS: Windows
Submission from: (NULL) (132.200.32.34)
Internal(format.POSIXlt(as.POSIXlt(Sys.time()), "%Y%m%d%q", F))
Linux R-2.2.1 returns "20060613%q".
Windows R-2.3.1 returns "20060613" dropping the "%q".
The documentation says "Any character in the format string other that the '%'
escape
2004 Oct 29
0
(PR#7320) Internal function isUME() in findGeneric() is
Jeffrey J. Hallman wrote:
>OK, I looked at the documentation and you're right about that. However,
>I'm curious about why the first argument to UseMethod is ever necessary.
>Is there ever a good reason for it to be something other than the name
>of the calling function? (Wouldn't that lead to confusing code?) If
>not, why bother with it at all?
>
>I've
2007 Feb 16
0
Request: make as.POSIXlt generic
In the base package, as.POSIXct() is an S3 generic function, but
as.POSIXlt() is not. As shown below, the current implementation is
already crying out to be refactored into a generic function with methods
for various classes. It calls "inherits" five times. Not only is this
bad style, it also disallows me or anyone else from making as.POSIXlt()
work with other kinds of time-ish
2004 Oct 28
1
Internal function isUME() in findGeneric() is wrong (PR#7320)
Full_Name: Jeff Hallman
Version: 2.0
OS: Linux
Submission from: (NULL) (132.200.32.34)
The function findGeneric() in the utils namespace contains this internal
function:
isUME <- function(e) {
if (is.call(e) && (is.name(e[[1]]) || is.character(e[[1]]))) {
switch(as.character(e[[1]]), UseMethod = as.character(e[[2]]),
"{" =
2005 Jul 11
0
Sys.timzone() returns NA - problem caused by as.POSIXlt? (PR#8003)
This is not a bug in R: the documentation does say the result is
OS-specific.
`GMT' is a not a proper timezone on Windows, so NA is a valid answer.
(Windows seems to use GMT to refer to the timezone of the UK, e.g.
> Sys.time()
[1] "2005-07-11 07:49:56 GMT Daylight Time"
> Sys.timezone()
[1] "GMT Daylight Time"
although I am in British Summer Time not GMT.)
2001 Mar 30
1
User defined assignment function ignores argument names (PR#888)
Full_Name: Jeff Hallman
Version: 1.2.2
OS: Solaris
Submission from: (NULL) (132.200.32.33)
"boink<-" <- function(x, a = 1, b = 2, value){
print(match.call())
x
}
> z <- 1
> boink(z, b = 4) <- 22
boink<-(x = *tmp*, a = 4, value = 22)
>
Shouldn't it have matched the 4 to b, not a?
2006 Jun 20
1
Packaging platform-specific functions
I have a few functions, such as screenWidth() and screenHeight(), which
I have been able to implement for a Unix/Linux environment, but not for
Windows. (Does anyone know how to find the screen dimensions in
Windows?)
The Writing R Extensions manual tells me how to include
platform-specific sections in documentation, and even how to have
platform-specific help files. But it doesn't say
2003 Jun 12
0
Re: (PR#3241) write.table() fails for POSIXlt class and NAs in
Uwe,
You said you used
testdata <-
data.frame(date = strptime(c("31121991", "31121991"), "%d%m%Y"),
nothing = c(NA, NA))
but that's not the same object, and that one does work for me.
> dput(testdata)
structure(list(date = structure(c(694137600, 694137600), class = c("POSIXt",
"POSIXct")), nothing = c(NA, NA)),
2019 Mar 09
0
POSIXlt$zone and $gmtoff questions
I've been searching for patterns in why some POSIXlt objects have the zone
and gmtoff components and some don't and why gmtoff is sometimes NA when
the zone is known. Is there a pattern or is it just that the additional
fields and workarounds were added in an ad hoc way?
E.g., as.POSIXlt adds the zone and gmtoff components for all strings and
logical NA inputs if the time zone is not
2005 Mar 29
0
setAs between a new S4 class and "POSIXlt"
Dear R core team
Please apologize for posting the same question twice on R-help and
R-devel. Since I was not sure which list is appropriate I tried R-help (Tue
Mar 22), but got no answer.
Now I do not know if the formulation of my question was unclear or the
question is not so easy to answer or to easy (what I do not hope).
My problem: I create a new S4 class, containing one slot, data (of
2016 Dec 06
0
segfault with POSIXlt zone=NULL zone=""
On Tue, Dec 6, 2016 at 6:37 AM, <frederik at ofb.net> wrote:
> Hi all,
>
> I ran into a segfault while playing with dates.
>
> $ R --no-init-file
> ...
> > library(lubridate); d=as.POSIXlt(floor_date(Sys.time(),"year")); d$zone=NULL; d$zone=""; d
>
If you're asking about a bug in R, you should provide a *minimal*
reproducible
2020 Oct 23
0
The presence/absence of `zone` in POSIXlt depending on time zone as a cause of possible inconsistences?
?Hi again,
I take advantage of my previous mail to ask you a question for which I was looking for an answer when detected the behaviour I previously told. In the help of DataTimeClasses one can read:
"POSIXlt" objects will often have an attribute "tzone", a character vector of length 3 giving the time zone name from the TZ environment variable and the names of the base time
2005 Mar 22
0
setAs between a new S4 class and "POSIXlt"
Dear R gurus
I've a question concerning the transformation of a new S4 class
(that I defined) and the existing class "POSIXlt". I did the
following:
## Definition of the new class:
setClass("dtime",
representation(data = "POSIXlt"),
prototype(data = as.POSIXlt("2004/06/01")))
## Transformation between the new class "dtime"
2016 Dec 06
1
segfault with POSIXlt zone=NULL zone=""
>>>>> Joshua Ulrich <josh.m.ulrich at gmail.com>
>>>>> on Tue, 6 Dec 2016 09:51:16 -0600 writes:
> On Tue, Dec 6, 2016 at 6:37 AM, <frederik at ofb.net> wrote:
>> Hi all,
>>
>> I ran into a segfault while playing with dates.
>>
>> $ R --no-init-file
>> ...
>> >
2016 Dec 06
1
segfault with POSIXlt zone=NULL zone=""
Hi Joshua,
Thank you for minimizing my test case.
> > Hope I'm not doing something illegal...
> >
> You are. You're changing the internal structure of a POSIXlt object
> by re-ordering the list elements. You should not expect a malformed
> POSIXlt object to behave as if it's correctly formed. You can see
> it's malformed by comparing it's
2010 Jul 14
1
POSIXlt error for 1982-01-01
Hi, I am encountering a strange error in POSIXlt... anyone got a clue?
> as.POSIXlt("1982-01-01")
Error in as.POSIXlt.character("1982-01-01") :
character string is not in a standard unambiguous format
> as.POSIXlt("1992-01-01")
[1] "1992-01-01"
> as.POSIXlt("1972-01-01")
[1] "1972-01-01"
> as.POSIXlt("1962-01-01")
2010 Jul 14
1
POSIXlt error
Hi, I'm encountering a strange error in POSIXlt... anyone got a clue on
this?
> as.POSIXlt("1982-01-01")
Error in as.POSIXlt.character("1982-01-01") :
character string is not in a standard unambiguous format
> as.POSIXlt("1992-01-01")
[1] "1992-01-01"
> as.POSIXlt("1972-01-01")
[1] "1972-01-01"
>
2003 Aug 04
0
as.POSIXct Bug when used with POSIXlt arg and tz= arg (PR#3646)
Tracking down this bug was joint work with Jermoe Asselin (jerome at
hivnet.ubc.ca) and Patrick Connolly (p.connolly at hortresearch.co.nz). We
collectively were able to determine that this is a problem in both Windows 2000
and in Linux and by testing it in our three time zones that it seems to be
daylight savings time related.
Conversion of POSIXlt datetimes to POSIXct appears to have problems.
2008 Feb 17
1
How to make a vector/list/array of POSIXlt object?
Hi Guys,
I'm cooking up my time series code. I want a data frame with first column as timestamp in POSIXlt format.
I hit on this the problem of how to create an array/list/vector of POSIXlt objects. Code is as follows
> dtt=array(dim = 2)
> t=as.POSIXlt( strptime("07/12/07 13:20:01", "%m/%d/%Y %H:%M:%S",tz="GMT"))
> dtt
[1] NA NA
> t
[1]
2011 Aug 07
1
all.equal doesn't work for POSIXlt objects
Hi all,
following sample code illustrates the problem :
Date1 <- Date2 <-
as.POSIXlt(seq.Date(as.Date("2010-04-01"),as.Date("2011-04-01"),by='day'))
identical(Date1,Date2)
all.equal(Date1,Date2)
identical() gives the correct answer. As there is no all.equal method
for POSIXlt objects, all.equal.list is used instead. Subsetting using
[[]] doesn't work