[R] coordinates from locator function in POSIXct format

cristabel.duran cristabel.duran at waldbau.uni-freiburg.de
Fri Jul 29 18:37:32 CEST 2011


Thanks David and Janis,
now the result is logic!

have a nice WE,
Cristabel.


On 07/29/2011 06:32 PM, David Winsemius wrote:
>
> On Jul 29, 2011, at 12:21 PM, cristabel.duran wrote:
>
>> Hi Janis,
>> thank you for you answer.
>>
>> Actually already I did exactly what you said. However, when I convert 
>> the number of "seconds" from the first measurement (some day in July 
>> 2010) then a I get a date in the year 2050 which is impossible. The 
>> latest date possible is 29March2011.
>>
>> my value in ?seconds?: 1285038419
>> z <- 1285038419
>> as.POSIXct(z, origin="2010-07-15")
>> "2051-04-04 03:06:59 CEST"
>>
>> any clue why I get this date?
>
> Because the default origin is 1970-01-01
>
> > z <- 1285038419
> > as.POSIXct(z, origin="1970-01-01")
> [1] "2010-09-21 04:06:59 EDT"
>



More information about the R-help mailing list