similar to: AW: ISOdate() and strptime()

Displaying 20 results from an estimated 3000 matches similar to: "AW: ISOdate() and strptime()"

2003 Nov 14
5
ISOdate() and strptime()
Dear R-people! I am using R 1.8.0, under Windows XP. While using ISOdate() and strptime(), I noticed the following behaviour when "wrong" arguments (e.g., months>12) are given to these functions: > ISOdate(year=2003,month=2,day=20) #ok [1] "2003-02-20 13:00:00 Westeurop?ische Normalzeit" > ISOdate(year=2003,month=2,day=30) #wrong day, but returns a value [1]
2003 Nov 19
5
ISOdate returns incorrect date?
Dear all, I have found the following (for me) incomprehensible behaviour of ISOdate (POSIXct): > ISOdate(1900,6,16) [1] "1900-06-15 14:00:00 Westeurop?ische Sommerzeit" > ISOdate(1950,6,16) [1] "1950-06-16 14:00:00 Westeurop?ische Sommerzeit" Note that in the first case I get the 15th of June back, not the 16th as I would have expected! This happened under R-1.7.1 on
2011 Mar 10
1
Timezone issue with strftime/strptime and %z and %Z
Hello! I've been trying to get this right for quite a while now and fear there is an easy solution I just don't see. I did not have this problem in Linux, and I searched r-help and Google but did not find a solution, but of course I am grateful for and resources I might not have found our not understood yet. I try to parse a time stamp with time zone. I essentially just want to parse the
2007 Oct 08
2
Incompatible methods ("-.POSIXt", "Ops.difftime") for "-"
Dear all, according to the Help-page of DateTimeClasses {base} I should be able to do time - z with time date-time objects z a numeric vector (in seconds) or an object of class "difftime". However, on R version 2.6.0 (Windows XP) I get > Sys.time() - as.difftime(c("0:3:20", "11:23:15")) Time differences in mins [1] 1191837998 1191837318
2003 Nov 24
0
apologies (was RE: [R] ISOdate() and strptime())
Dear Brian and other R-developers, I have to say that I don't understand why what I wrote should have caused any offence. A smile was what I was hoping for. You know I devote more time than I am supposed to, to support R and its users, in partial repayment of my immeasurable debt to all the Developers. It's not much, it's sometimes misguided (I later discover), and my resources
2008 Apr 10
1
ISOdate/ISOdatetime performance suggestions, other date/time questions
Dear list: working with date/times I have come across a problem that ISOdate and ISOdatetime are too slow on large vectors of data. I was surprised just until I looked at the implementation and the man page: "ISOdatetime and ISOdate are convenience wrappers for strptime". In other terms, they convert data to character representation first in order to create a POSIXlt object that is then
2007 Apr 12
3
Method dispatch for print() in package its
Dear all, in the package its the print() method does not seem to correctly work in all circumstances: > selectMethod(print, "its") Method Definition: function (x, ...) { print(x@.Data <mailto:x@.Data> , ...) } <environment: namespace:its> Signatures: x target "its" defined "its" > fundPME.lst[[1]]$irr An object of
2003 Nov 12
1
value of strptime in R 1.8.0
Dear R-people! I am using R 1.8.0, under Windows XP. What I want to do is a date conversion of a character column of a data frame and assign the result as a new column. Simple example: > x <- data.frame(a=c("yesterday","today","tomorrow"), b=I(c("20031111", "20031112", "20031113"))) # convert x$b from character to date: >
2003 May 14
2
number of patients in a hospital on a given date
Dear R-users! I am using R 1.7.0, under Windows XP. Having some hospital discharge data (admission date and discharge date for each patient), I want to get the number of patients in the hospital on a given date. My data look like (simple example): > x <- data.frame(patid=c("pat1", "pat2"), adm.date = c("15.03.2002", "16.03.2002"),
2004 Aug 17
3
Fwd: strptime() problem?
Hi all; I've already send a similar e-mail to the list and Prof. Brian Ripley answered me but my doubts remain unresolved. Thanks for the clarification, but perhaps I wasn't clear enough in posting my questions. I've got a postgres database which I read into R. The first column is Timestamp with timezone, and my data are already in UTC format. An 'printed' extract of R
2004 Mar 05
3
as.POSIXct problem
Hi all, I'm having difficulty converting a 'dates' object to a POSIXct object: testDATES<-c(35947,35971,36004,36008,36053,36066) testDATES<-chron(dates=testDATES, format = c(dates = "m/d/y"), origin=c(month = 12, day = 30, year = 1899)) >[1] 06/01/98 06/25/98 07/28/98 08/01/98 09/15/98 09/28/98 > as.POSIXct(testDATES) [1] NA NA NA NA NA NA
2003 Oct 21
0
summary - controling x-labels in xyplot (lattice) when x is POSIX object
Hi, The solution to my problem is to use lattice:::calculateAxisComponents to calculate appropriate labels for the time axis in trellis plots. # For example, given x <- seq.POSIXt(strptime("2003/01/01", format = "%Y/%m/%d"), strptime("2003/10/01", format = "%Y/%m/%d"), by = "month") y <- rnorm(length(x)) dat <-
2017 Jan 11
0
bug with strptime, %OS, and "."
Works for me: > strptime("17_35_14.01234.mp3","%H_%M_%OS")$sec [1] 14.01234 > strptime("17_35_14.mp3","%H_%M_%OS")$sec [1] 14 Just leave off the ".mp3" in your time pattern. Relevant section from the help ("Details") for strptime: strptime converts character vectors to class "POSIXlt": its input x is first converted by
2007 Jun 12
1
Can strptime handle milliseconds or AM/PM?
I'm trying to proess date/time fields from files that were given to me to analyze. Any clues what I'm doing wrong with strptime? This seems to fail the same way under Linux or Windows. For ?strptime would it make sense to explain %OS3 somewhere besides the Examples? > # Why does %OS3 work here? > format(Sys.time(), "%H:%M:%S") [1] "16:45:19" >
2016 Apr 18
1
as.Date
Dear ALL, Thank you so much for your contributions. I have made some progress. Below is a simple script I gleaned from your kind responses: Sys.setenv(TZ="Etc/GMT") dates <- c("02/27/92", "02/27/92", "01/14/92", "02/28/92", "02/01/92") times <- c("23:0:0", "22:0:0", "01:00:00", "18:0:0",
2007 Jan 08
1
Does strptime(...,tz="GMT") do anything?
Hi All In trying to correlate some tide gauge data I need to deal with varying timezones. From the documentation on strptime, it seemed that the tz variable might have some effect on the conversion, but I'm not seeing an effect. > strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="PST")+0 [1] "2006-12-01 01:02:00 EST" >
2016 Apr 18
0
as.Date: fixed
Dear All, Many thanks for bailing me out. Ogbos On Apr 18, 2016 9:07 PM, "David Winsemius" <dwinsemius at comcast.net> wrote: > > > On Apr 18, 2016, at 10:44 AM, Ogbos Okike <giftedlife2014 at gmail.com> > wrote: > > > > Dear ALL, > > Thank you so much for your contributions. > > I have made some progress. Below is a simple script I
2008 May 30
3
Strptime
Hi This code should explain what I'm trying to do > strptime("30-Jan-08", "%d-%b-%y") [1] "2008-01-30" > > format(strptime("30-Jan-08", "%d-%b-%y") , "%b-%y") [1] "Jan-08" > > strptime(format(strptime("30-Jan-08", "%d-%b-%y") , "%b-%y") , "%b-%y") [1] NA I have a
2011 Jul 06
1
trouble parsing a date using strptime()
Hi, I am having a trouble parsing dates using strptime() that I get in the format of year and week number. The data looks like this "201127" which means year 2011 and week 27. I would like to graph this using ggplot but then I get a gap between 201054 and 201101 so I thought I would just easily convert it. I tried to use strptime and as.Date and the format string of %Y%W but it seems
2016 Mar 12
0
Regression in strptime
> On 12 Mar 2016, at 00:05 , Mick Jordan <mick.jordan at oracle.com> wrote: > > This is definitely obscure but we had a unit test that called .Internal(strptime, "1942/01/01", %Y/%m/%d") with timezone (TZ) set to CET. Umm, that doesn't even parse. And fixing the typo, it doesn't run: > .Internal(strptime, "1942/01/01", %Y/%m/%d") Error: