Displaying 20 results from an estimated 7000 matches similar to: "Request: make as.POSIXlt generic"
2009 Feb 27
0
POSIXlt, POSIXct, strptime, GMT and 1969-12-31 23:59:59
R-devel:
Some very inconsistent behavior, that I can't seem to find documented.
Sys.setenv(TZ="GMT")
str(unclass(strptime("1969-12-31 23:59:59","%Y-%m-%d %H:%M:%S")))
List of 9
$ sec : num 59
$ min : int 59
$ hour : int 23
$ mday : int 31
$ mon : int 11
$ year : int 69
$ wday : int 3
$ yday : int 364
$ isdst: int 0
- attr(*, "tzone")= chr
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]
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
2006 Jun 13
0
format.POSIXlt drops characters following percent sign (PR#8976)
On Tue, 13 Jun 2006, jhallman at frb.gov wrote:
> 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".
There is no
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 May 01
0
Re: (PR#7826) ... segfault during build of 2.1.0 on RH9; print.POSIXct ...
Dear Peter,
Thank you very much for your kind and helpful reply.
As I mentioned in a followup email to r-bugs, indeed, one aspect of this
issue is a (user specified) shorter stack than that expected by R -- I
had only allowed 1 MB of stack space a long long time ago, and forgotten
about it.
Due to a glitch with r-bugs@r-project.org, I ended up submitting this
bug twice, and your original
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.)
2015 Dec 07
2
inconsistency in POSIXlt
The documentation for the POSIXlt class states '"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 zone and the alternate (daylight-saving) time zone. Sometimes this may
just be of length one, giving the time zone
2006 Nov 09
1
POSIXlt converted to POSIXct in as.data.frame()
In trying to use as.Date(), I've come across the conversion of POSIXlt to
POSIXct when a POSIXlt variable is included in a data frame:
my_POSIX <- strptime(c("11-09-2006", "11-10-2006", "11-11-2006",
"11-12-2006", "11-13-2006"), "%m-%d-%Y")
str(my_POSIX)
my_Date <- as.Date(my_POSIX)
str(my_Date)
data <- format(my_Date)
2005 Apr 30
0
(PR#7826) Re: ... print.POSIXct .. infinite recursion
Thank you, Jskud.
I can reproduce your problem, though not the
seg.fault, see below
>>>>> "Jskud" == Jskud <Jskud@Jskud.com>
>>>>> on Sat, 30 Apr 2005 09:04:03 +0200 (CEST) writes:
Jskud> In attempting to build R using rpmbuild --rebuild
Jskud> R-2.1.0-0.fdr.2.fc3.src.rpm
Jskud> on a fairly up-to-date RedHat 9 system (that
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)),
2001 May 15
1
what happende to as.POSIC.ct ???
In my 1021-version I get:
> version
_
platform i386-pc-mingw32
arch x86
os Win32
system x86, Win32
status
major 1
minor 2.1
year 2001
month 01
day 15
language R
> as.POSIXct( "1970/01/01" )
[1]
2004 Mar 08
5
years from as.POSIXlt
Hi,
how it's possible to extract the year and the number
of days from Julian date. i'm little confused about the last two
functions and ?years .
EDATE comes from sqlQuery with as.is=T
EDATE <- as.POSIXlt(datvears$ENROLLDAY)
Many thanks, Christian
> EDATE[1:5]
[1] "2000-06-30 11:25:01" "2000-06-30 11:39:55" "2000-06-30 12:11:11"
[4]
2007 Apr 04
1
time zone problems
Folks,
I'm having trouble with how datetime objects with time zones are set
and plotted. This may be the result of my running R (2.4.0) on a
Windoze XP box. Perhaps not. Here are two example problems I need
advise on if you have time:
1) I collect data with dates (often as a fractional day of year) in
UTC. Using strptime to create date time objects appears to force the
data into
2006 Jul 23
1
diff, POSIXct, POSIXlt, POSIXt
Dear Listers,
I have encountered a strange problem using diff() and POSIXt:
dts<-c("15/4/2003","15/7/2003","15/10/2003","15/04/2004","15/07/2004","15/10/2004","15/4/2005","15/07/2005","15/10/2005","15/4/2006")
dts <- strptime(dts, "%d/%m/%Y")
class(dts)
[1] "POSIXt"
2006 Jul 23
1
diff, POSIXct, POSIXlt, POSIXt
Dear Listers,
I have encountered a strange problem using diff() and POSIXt:
dts<-c("15/4/2003","15/7/2003","15/10/2003","15/04/2004","15/07/2004","15/10/2004","15/4/2005","15/07/2005","15/10/2005","15/4/2006")
dts <- strptime(dts, "%d/%m/%Y")
class(dts)
[1] "POSIXt"
2004 Feb 06
2
vector of factors to POSIXlt
hello,
I have a vector of factors
> str(rcptdt)
Factor w/ 51 levels "1/10/03","1/13/03",..:
> length(rcptdt)
[1] 87
which i want to convert to class POSIXlt to extract the day, so:
a1<-format(rcptdt,"%m/%d/%y")
> length(a1)
[1] 87
and:
a2<-strptime(a1, "%m/%d/%y")
str(a2)
`POSIXlt', format: chr [1:87] "2002-04-18"
2019 Aug 02
0
Infrequent but steady NULL-pointer caused segfault in as.POSIXlt.POSIXct (R 3.4.4)
In an optimized build, debug info is just an approximation. It might
help to debug in a build of R and packages without compiler
optimizations (-O0), where the debug information is accurate. However,
first I would try to modify the example to trigger more often, or try to
find external ways to make it trigger more often (e.g. via gctorture).
Then I would try to make the example smaller (not
2020 Oct 23
1
timezone tests and R-devel
Yes, you are absolutely right and I'm pretty sure this will be fixed in
one way or another.
IMO, the failing test should simply use all.equal.POSIXt's new argument
check.tzone=FALSE.
Two simple alternatives modifying all.equal.POSIXt behaviour:
- make check.tzone=FALSE the default: this is inconsistent with other
arguments of all.equal methods, always defaulting to stricter checks
-
2020 Oct 02
0
timezone tests and R-devel
Thank you for the report. In R-devel, all.equal.POSIXt() by default
reports inconsistent time zones. Previously,
> x <- Sys.time()
> all.equal(x, as.POSIXlt(x, tz = "EST5EDT"))
would return TRUE. To ignore the time zone attributes in R-devel, the
argument 'check.tzone = FALSE' needs to be used.
That said, I can reproduce the 'make check' failure in R-devel on