similar to: POSIXlt, POSIXct, strptime, GMT and 1969-12-31 23:59:59

Displaying 20 results from an estimated 1000 matches similar to: "POSIXlt, POSIXct, strptime, GMT and 1969-12-31 23:59:59"

2010 Sep 08
0
Correction to vec-subset speed patch
I found a bug in one of the fourteen speed patches I posted, namely in patch-vec-subset. I've fixed this (I now see one does need to duplicate index vectors sometimes, though one can avoid it most of the time). I also split this patch in two, since it really has two different and independent parts. The patch-vec-subset patch now has only some straightforward (locally-checkable) speedups for
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
2003 Jun 12
0
Re: write.table() fails for POSIXlt class and NAs in another variable (PR#3242)
Uwe Ligges wrote: > Consider the following data.frame: > > > testdata > date nothing > 1 1991-12-31 NA > 2 1991-12-31 NA > > where date is of class POSIXlt. For easy reproducibility: > > "testdata" <- structure(list(date = structure(list(sec = c(0, 0), > min = c(0, 0), hour = c(0, 0), mday = c(31, 31), mon = c(11, 11),
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)),
2020 Oct 23
2
The presence/absence of `zone` in POSIXlt depending on time zone as a cause of possible inconsistences?
Dear all, I have just detected what seems a minor inconsistence with data types. If one unlists a POSIXlt time with GMT zone gets a numeric vector, since the POSIXlt list has no `zone` element, while if one unlists a POSIXlt time with a non GMT zone (also non specifying tz if the Sys.timezone is not GMT) gets a character vector due to including the `zone` element. > x <-
2007 Mar 21
1
bug and patch: strptime first-of-month error in (possibly unsupported use of) "%j" format (PR#9577)
Full_Name: John Brzustowski Version: R-devel-trunk OS: linux (problem under Windows too) Submission from: (NULL) (74.101.124.238) (This bug was discovered by Phil Taylor, Acadia University.) I'm not sure from reading the documentation whether strptime(x, "%j") is meant to be supported, but if so, there is a bug which prevents it from working on the first day of months after
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.)
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]
2017 Oct 09
1
Using response variable in interaction as explanatory variable in glm crashes R
>>>>> Jan van der Laan <rhelp at eoos.dds.nl> >>>>> on Fri, 6 Oct 2017 12:13:39 +0200 writes: > It is actually model.matrix that crashes, not glm. Same > crash occurs with e.g. lm. > model.matrix(dob_mon ~ dob_day*dob_mon, data = tab) > also crashes R. Yes, segmentation fault. It only happens when these are *logical*
2010 Oct 01
3
Converting a dataframe column from string to datetime
Hi, I have a dataframe column of the form v<-c("Fri Feb 05 20:00:01.43000 2010","Fri Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:06.34000 2010") I need to convert this to datetime form. I did the following.. lapply(v,function(x){strptime(x, "%a %b %d %H:%M:%OS %Y")}) This gives me a list that looks like
2010 Dec 27
1
Can't merge on datetime?
x = structure(list(date = structure(list(sec = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), min = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), hour = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), mday = c(1L, 2L, 3L, 4L, 5L, 8L, 9L, 10L, 11L, 12L, 15L, 16L, 17L, 18L, 19L, 22L, 23L, 24L,
2007 Jan 17
2
problem with unlist POSIX date at midnight
Dear R-users, I use unlist of POSIX dates to extract the year, hour etc. With that I can search for files in my database which are in the form 'yyyymmddhh_synops.txt' However, I get stucked during midnight where unlist just gives NA's. The script is given below, the problem accurs at acc.period[16] (midnight). However when I write out the character, unlist works well. But
2003 Aug 13
1
Problems with addition in big POSIX dates
Have you noticed any problems with big dates (>=1/1/2040) in R? Here is the bit of code that I'm having trouble with: > test.date <- strptime("1/1/2040",format="%m/%d/%Y") > > unlist(test.date) sec min hour mday mon year wday yday isdst 0 0 0 1 0 140 0 0 0 > > date.plus.one <- as.POSIXct(test.date) +
2000 Feb 23
0
Fwd: RE: Group logon Scripts
I have a similar situation and have assigned all users to varying primary groups. It works OK but could be better. I am including an e-mail from the samba list that improves on my login/out scripts. I have not had a chance to try the improvements yet. Good luck. Forwarded From: "Naccarato, Robert" <naccarar@bis.adp.com> > > > I use the following script in the root
2005 Oct 06
2
isdst
Can someone, please, explain the difference is results below (notice the isdst value) > unlist(as.POSIXlt('2005-7-1')) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 1 > unlist(as.POSIXlt(as.Date('2005-7-1'))) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 0
2018 Mar 21
0
Sum of columns of a data frame equal to NA when all the elements are NA
Surely the result of summation of non-existent values is not defined, is it not? And since the NA values have been _removed_, there's nothing left to sum over. In fact, pretending the the result in that case is zero would appear audacious, no? Cheers, Boris > On Mar 21, 2018, at 12:58 PM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: > > What do you mean by
2007 Mar 03
0
2 bugs in max.col() (PR#9542)
Dear R-Developers, I think I found two bugs in max.col(). Ties between zeros are not broken, which might affect simulations. -Inf and Zero can be treated the same, which can give completely wrong results, e.g. when the second max is sought by replacing all maxs by -Inf. To fix max.col I do offer the C-code behind my function rowMax(), which also handles NAs and seems to be faster. However,
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
2016 Jan 27
0
Suggestions for improvement as regards `as` methods, and a call for consistency in `as.Date` methods
Good evening all, This topic is gone into at a bit more length at my related Stack Overflow question here: http://stackoverflow.com/questions/34647674/why-do-as-methods-remove-vector-names-and-is-there-a-way-around-it There are two lingering issues despite the abundant insight received at SO, namely: 1) _Why_ do as methods remove their arguments' names attribute? This is a fact which is
2018 Mar 21
3
Sum of columns of a data frame equal to NA when all the elements are NA
What do you mean by "should not"? NULL means "missing object" in R. The result of the sum function is always expected to be numeric... so NA_real or NA_integer could make sense as possible return values. But you cannot compute on NULL so no, that doesn't work. See the note under the "Value" section of ?sum as to why zero is returned when all inputs are removed.