Displaying 20 results from an estimated 8000 matches similar to: "lubridate, as.POSIXct and a vector of times: bug or feature??"
2012 Mar 30
1
lubridate:ymd_hm and coercion of class POSIXct. Smooth way to restore the date format.
Dear all,
I wish to create a POSIXct variable from date and time variables using the ymd_hm function in package lubridate. In some cases data for time is missing, which causes a problem for ymd_hm. I wish to find a smooth way to handle this.
# Some example data:
x <- data.frame(date = c("2011-09-22", "2011-07-28"), time = c("15:00", NA))
x
# paste date and
2012 Mar 06
0
lubridate 1.1.0
#lubridate
lubridate makes it easier to work with dates and times by providing
functions to identify and parse date-time data, extract and modify
components of a date-time (years, months, days, hours, minutes,
and seconds), perform accurate math on date-times, handle time zones and
Daylight Savings Time. lubridate has a consistent, memorable syntax that
makes working with dates less frustrating.
2012 Mar 06
0
lubridate 1.1.0
#lubridate
lubridate makes it easier to work with dates and times by providing
functions to identify and parse date-time data, extract and modify
components of a date-time (years, months, days, hours, minutes,
and seconds), perform accurate math on date-times, handle time zones and
Daylight Savings Time. lubridate has a consistent, memorable syntax that
makes working with dates less frustrating.
2005 Oct 17
1
as.POSIXct before and after 1970
Can someone, please, explain the difference in as.POSIXct results
before 1970 and on and after 1970 as illustrated below.
After 1970, the use of 'EST' or "EST+5EDT' as the timezone does not
affect the result of asPOSIXct, but before 1970 on 10/28 the results
are different.
> as.POSIXct('1970-10-29', tz='EST')+1
[1] "1970-10-29 00:00:01 EST"
>
2011 May 31
3
DateTime Math in R - POSIXct
Greetings -
I'm battling POSIXct, as per the code below. My input is actually an XL
file, but the weird results below correctly model what I am seeing in my
program.
Before I punt and use lubridate or timeDate, could anyone please help me
understand why POSIXct forces my variable back to GMT?
I suspect that I'm not properly coding the tzone value, but it does not
throw an
2010 Jan 12
0
Wishlist: Function 'difftime' to honor 'tzone' attribute (PR#14182)
Full_Name: Suharto Anggono
Version: 2.8.1
OS: Windows
Submission from: (NULL) (125.165.84.118)
PR#14076 inspired me to write this.
> t1 <- as.POSIXct("1970-01-01 00:00:00", tz="GMT")
> t2 <- as.POSIXlt("1970-01-01 00:00:00", tz="GMT")
> t1 - t2
Time difference of 7 hours
Above, t1 and t2 represent the same time in the same specified
2010 Aug 31
0
New package: lubridate 0.1
Please find below the package announcement for the R package lubridate
available from cran.
Thank you,
Garrett Grolemund
Rice University
##lubridate
Date-time data can be frustrating to work with in R. R commands for
date-times are generally unintuitive and change depending on the type
of date-time object being used. Moreover, the methods we use with
date-times must be robust to time zones,
2010 Aug 31
0
New package: lubridate 0.1
Please find below the package announcement for the R package lubridate
available from cran.
Thank you,
Garrett Grolemund
Rice University
##lubridate
Date-time data can be frustrating to work with in R. R commands for
date-times are generally unintuitive and change depending on the type
of date-time object being used. Moreover, the methods we use with
date-times must be robust to time zones,
2012 Jan 11
2
lubridate does not install on FreeBSD any more
With newest R devel
#sessionInfo()
R Under development (unstable) (2012-01-10 r58085)
Platform: amd64-portbld-freebsd10.0 (64-bit)
locale:
[1]
de_DE.ISO8859-15/de_DE.ISO8859-15/de_DE.ISO8859-15/C/de_DE.ISO8859-15/de_DE.ISO8859-15
attached base packages:
[1] stats graphics grDevices utils datasets methods base
I get the following error when I try to build and install lubridate from
2011 Aug 30
1
lubridate and intervals
Hiya,
maybe there is a native R function for this and if so please let me know!
I have 2 data.frames with start and end dates, they read in as strings and I
am converting to POSIXct. How can I check for overlap?
The end result ideally will be a single data.frame containing all the
columns of the other two with rows where there were date overlaps.
2010 Nov 17
0
lubridate v2.2 available on cran
Version 2.2 of the lubridate package is now available. lubridate makes it
easier to work with date-time data. For example, it provides:
* simple functions to extract and modify components of a date-time,
such as years, months, days, hours, minutes, and seconds: year(),
month(), day(), ...
* quick and easy functions to parse date-times: ymd(), dmy(), mdy(), ...
* helper functions for handling
2010 Nov 17
0
lubridate v2.2 available on cran
Version 2.2 of the lubridate package is now available. lubridate makes it
easier to work with date-time data. For example, it provides:
* simple functions to extract and modify components of a date-time,
such as years, months, days, hours, minutes, and seconds: year(),
month(), day(), ...
* quick and easy functions to parse date-times: ymd(), dmy(), mdy(), ...
* helper functions for handling
2012 Nov 16
2
lubridate concatenation issue
I took a look at Hadley's lubridate which seems a very neat package, but i am having a small problem with concatenating lubridates to build vectors of it. Namely when function c( ) is applied to lubridate seems to change time to a local timezone in this particular case changing the date to previous one.
> d<-ymd('20111231')
> d
[1] "2011-12-31 UTC"
> c(d)
[1]
2018 Aug 24
0
conflicted: an alternative conflict resolution strategy
Hadley,
Overall seems like a cool and potentially really idea. I do have some
thoughts/feedback, which I've put in-line below
On Thu, Aug 23, 2018 at 11:31 AM, Hadley Wickham <h.wickham at gmail.com>
wrote:
>
> <snip>
>
> conflicted applies a few heuristics to minimise false positives (at the
> cost of introducing a few false negatives). The overarching goal is
2018 Aug 24
0
conflicted: an alternative conflict resolution strategy
Dear Hadley,
There's been some mails from you lately about packages on R-devel. I would
argue that the appropriate list for that is R-pkg-devel, as I've been told
myself not too long ago. People might get confused and think this is about
a change to R itself, which it obviously is not.
Kind regards
Joris
On Thu, Aug 23, 2018 at 8:32 PM Hadley Wickham <h.wickham at gmail.com>
2018 Aug 23
0
conflicted: an alternative conflict resolution strategy
First, some general comments:
This sounds like a useful package.
I would guess it has very little impact on runtime efficiency except
when attaching a new package; have you checked that?
I am not so sure about your heuristics. Can they be disabled, so the
user is always forced to make the choice? Even when a function is
intended to adhere to the superset principle, they don't always
2013 Jan 11
1
Date time conversion bug (as.POSIXct)?
There is something wrong, I think, with the date-time conversion from a
numeric value if you use Central European Time (CET) as timezone.
Examples from R:
If I use the GMT time zone it is OK, I get the same time back from
as.POSIXct as I entered
> as.POSIXct(as.numeric(strptime("30/01/2012 13:00:00", format="%d/%m/%Y
>
2010 Sep 03
1
Incorrect formatted output after subtracting non-integer seconds from POSIXt origin
> x<-as.POSIXct("1970-1-1", tz="UTC")-.5
> y<-as.POSIXct("1970-1-1", tz="UTC")+.5
> x==y
[1] FALSE # of course
but x and y "appear" to be the same when formatted, even with extra
precision:
> format(x, format="%Y-%m-%d %H:%M:%OS2")
[1] "1970-01-01 00:00:00.50"
> format(y, format="%Y-%m-%d
2020 Jan 03
3
Error en salida de lubridate::seconds_to_period() en Rmarkdown
Buas y feliz año y decada nueva, compañeRos,
Me estoy encontrando con un problema tonto que no consigo resolver.
Explico, tengo un dato que necesito sacar en un documento con codigo on
line y no me saca el resultado de consola.
dato <- 2272.13
round(lubridate::seconds_to_period(seconds(dato))), 0)
En consola me da:
"37M 52S"
Pero en el documento
```Rmarkdown
+ Duración total
2012 Nov 13
1
Using lubridate to increment date by business days only
Hello,
I know how to increment a date by calendar date:
ticker$ldate <- ticker$tdate + days(5)
How do I increment it by business days only so that week-ends are not
counted?
So for example friday november 2 + 5days becomes friday november 9 & not
wednesday nov 7.
Thanks for your help.
--
View this message in context: