[R] generating a sequence of seconds
Bert Gunter
gunter.berton at gene.com
Tue Aug 12 22:23:57 CEST 2014
Marc:
You just need to be more patient -- this is already happening:
http://en.wikipedia.org/wiki/Tidal_acceleration
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll
On Tue, Aug 12, 2014 at 1:10 PM, Marc Schwartz <marc_schwartz at me.com> wrote:
>
> On Aug 12, 2014, at 2:49 PM, John McKown <john.archie.mckown at gmail.com> wrote:
>
>> And some people wonder why I absolutely abhor daylight saving time.
>> I'm not really fond of leap years and leap seconds either. Somebody
>> needs to fix the Earth's rotation and orbit!
>
>
> I have been a longtime proponent of slowing the rotation of the Earth on its axis, so that we could have longer days to be more productive.
>
> Unfortunately, so far, my wish has gone unfulfilled...at least as it is relevant within human lifetimes.
>
> ;-)
>
> Regards,
>
> Marc
>
>
>>
>> On Tue, Aug 12, 2014 at 2:14 PM, William Dunlap <wdunlap at tibco.com> wrote:
>>>> What if I just want the seconds vector without the date, please? Is there
>>>> a convenient way to create such a vector, please?
>>>
>>> Why do you want such a thing? E.g., do you want it to print the time
>>> of day without the date? Or are you trying to avoid numeric problems
>>> when you do regressions with the seconds-since-1970 numbers around
>>> 1414918800? Or is there another problem you want solved?
>>>
>>> Note that the number of seconds in a day depends on the day and the
>>> time zone. In US/Pacific time I get:
>>>
>>>> length(seq(from=as.POSIXct("2014-08-12
>>> 00:00:00"),to=as.POSIXct("2014-08-12 23:59:59"), by="secs"))
>>> [1] 86400
>>>> length(seq(from=as.POSIXct("2014-03-09
>>> 00:00:00"),to=as.POSIXct("2014-03-09 23:59:59"), by="secs"))
>>> [1] 82800
>>>> length(seq(from=as.POSIXct("2014-11-02
>>> 00:00:00"),to=as.POSIXct("2014-11-02 23:59:59"), by="secs"))
>>> [1] 90000
>>>
>>> Bill Dunlap
>>> TIBCO Software
>>> wdunlap tibco.com
>>>
>>>
>>> On Tue, Aug 12, 2014 at 11:51 AM, Erin Hodgess <erinm.hodgess at gmail.com> wrote:
>>>> Hello!
>>>>
>>>> If I would like to generate a sequence of seconds for a date, I would do
>>>> the following:
>>>>
>>>> x <- seq(from=as.POSIXct(2014-08-12 00:00:00),to=as.POSIXct(2014-08-12
>>>> 23:59:59),by="secs")
>>>>
>>>> What if I just want the seconds vector without the date, please? Is there
>>>> a convenient way to create such a vector, please?
>>>>
>>>> thanks,
>>>> Erin
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list