[R] Problems with time formats when importing data using readHTMLTable

Cristina Silva csilva at ipma.pt
Mon Jul 10 17:31:30 CEST 2017


Hi,

I am extracting positions data from the marine traffic website. The 
table has a "Timestamp" column which, in the browser, appears with the 
format yyyy-mm-dd HH:MM (UTC), e.g. 2017-07-10 14:04 (UTC).

When I import the table, the same date "2017-07-10 14:04 (UTC)" appears 
as "1499696500149969650021 minutes ago", This is the more recent date 
and time. Older records, as e.g. "2017-07-09 17:02 (UTC)" appear as e.g. 
"1499619726149961972621 hours, 59 minutes ago".

I don't know how to convert these data to the time formats used in R 
(POSIXct).

The script is very simple and worked before:

library(XML)
x <- readHTMLTable('url')

where the 'url' is the link to the website with the specification of the 
vessel.

I appreciate any help.

Cristina

-- 
Cristina Silva
Divisão de Modelação e Gestão de Recursos Pesqueiros
Av. Dr. Alfredo Magalhães Ramalho
1495-165 Lisboa
@: csilva at ipma.pt <mailto:csilva at ipma.pt>
#: +351 213027096 <phoneto:+351213027096>


	[[alternative HTML version deleted]]



More information about the R-help mailing list