Re: [R] converting to POSIXct

2021-11-30 Thread Stefano Sofia
Thanks to all of you.
Stefano

 (oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff: +39 071 806 7743
E-mail: stefano.so...@regione.marche.it
---Oo-oO


Da: PIKAL Petr [petr.pi...@precheza.cz]
Inviato: martedì 30 novembre 2021 12.45
A: Duncan Murdoch; Jim Lemon
Cc: r-help mailing list; Stefano Sofia
Oggetto: RE: [R] converting to POSIXct

Hi,

that is what I tried to show to Stefano. That the issue was only with printing 
the values on console or as you explained in more depth the default formating 
when all time values (HMS) are zero.

So that Stefano used correct syntax.

Cheers
Petr

> -Original Message-
> From: Duncan Murdoch 
> Sent: Tuesday, November 30, 2021 12:05 PM
> To: Jim Lemon ; PIKAL Petr
> 
> Cc: r-help mailing list ; Stefano Sofia
> 
> Subject: Re: [R] converting to POSIXct
>
> On 30/11/2021 3:41 a.m., Jim Lemon wrote:
> > Hi,
> > Petr is right. Apparently as.POSIXct drops the smallest increments if
> > all are zero:
>
> That's not as.POSIXct doing anything:  there's no way to drop increments, the
> POSIXct format records a number of seconds and that can't be changed.
>
> What is happening is simply the default formatting.
>
> Be explicit about the format if you want to see the seconds, e.g.
>
>  > format(ssdf$data_POSIX, format = '%Y-%m-%d %H:%M:%S') [1] "2002-11-
> 01 00:00:00" "2002-11-01 00:00:00"
>
> Duncan Murdoch
>
> >
> > ssdf<-read.csv(text="data_POSIX,Sensor_code,value
> > 2002-11-01 00:00:01,1694,7.2
> > 2002-11-01 00:00:00,1723,10.8",
> > stringsAsFactors=FALSE)
> > ssdf$data_POSIX<-as.POSIXct(ssdf$data_POSIX,"%Y-%m-%d HH:MM:SS")
> ssdf
> >
> > data_POSIX Sensor_code value
> > 1 2002-11-01 00:00:011694   7.2
> > 2 2002-11-01 00:00:001723  10.8
> >
> > but if there is a single small increment, they all show up.
> >
> > Jim
> >
> > On Tue, Nov 30, 2021 at 7:33 PM PIKAL Petr 
> wrote:
> >>
> >> Hi
> >>
> >> You probably has zero hours in all your data
> >>
> >> see
> >>> temp
> >> data_POSIX Sensor_code value
> >> 1 2002-11-01 00:00:001694   7.2
> >> 2 2002-11-01 00:00:001723  10.8
> >>
> >> without hours
> >>> as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S",
> >>> tz="Etc/GMT-1")
> >> [1] "2002-11-01 +01" "2002-11-01 +01"
> >>
> >> add value to hours
> >>> fix(temp)
> >>> temp
> >> data_POSIX Sensor_code value
> >> 1 2002-11-01 00:01:001694   7.2
> >> 2 2002-11-01 00:00:001723  10.8
> >>
> >> Voila, hours are back.
> >>> as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S",
> >>> tz="Etc/GMT-1")
> >> [1] "2002-11-01 00:01:00 +01" "2002-11-01 00:00:00 +01"
> >>
> >> So nothing wrong in uyour code, hours are there but they are probably
> not printed to console and hours are there but hidden.
> >>
> >> Cheers
> >> Petr
> >>
> >>> -Original Message-
> >>> From: R-help  On Behalf Of Stefano
> >>> Sofia
> >>> Sent: Tuesday, November 30, 2021 9:20 AM
> >>> To: r-help mailing list 
> >>> Subject: [R] converting to POSIXct
> >>>
> >>> Dear R-list users,
> >>> I thought I was able to manage easily POSIXct, but this is not true.
> >>> I am not going to load the input txt file because I know that
> >>> attachments are not allowed. The structure of my input txt file is
> >>>
> >>> data_POSIX,Sensor_code,value
> >>> 2002-11-01 00:00:00,1694,7.2
> >>> 2002-11-01 00:00:00,1723,10.8
> >>> ...
> >>>
> >>> I load it with
> >>> myfile <- read.table(file="mypath/myfile.txt", header = TRUE,
> >>> sep=",", dec = ".", stringsAsFactors = FALSE)
> >>>
> >>> When I try to convert the data_POSIX column (which is a character)
> >>> to POSIXct with
> >>>
> >>> myfile$data_POSIX <- as.POSIXct(myfile$data_POSIX, format =
> >>> "%Y-%m-%d %H:%M:%S", tz

Re: [R] converting to POSIXct

2021-11-30 Thread PIKAL Petr
Hi, 

that is what I tried to show to Stefano. That the issue was only with printing 
the values on console or as you explained in more depth the default formating 
when all time values (HMS) are zero.

So that Stefano used correct syntax.

Cheers
Petr

> -Original Message-
> From: Duncan Murdoch 
> Sent: Tuesday, November 30, 2021 12:05 PM
> To: Jim Lemon ; PIKAL Petr
> 
> Cc: r-help mailing list ; Stefano Sofia
> 
> Subject: Re: [R] converting to POSIXct
> 
> On 30/11/2021 3:41 a.m., Jim Lemon wrote:
> > Hi,
> > Petr is right. Apparently as.POSIXct drops the smallest increments if
> > all are zero:
> 
> That's not as.POSIXct doing anything:  there's no way to drop increments, the
> POSIXct format records a number of seconds and that can't be changed.
> 
> What is happening is simply the default formatting.
> 
> Be explicit about the format if you want to see the seconds, e.g.
> 
>  > format(ssdf$data_POSIX, format = '%Y-%m-%d %H:%M:%S') [1] "2002-11-
> 01 00:00:00" "2002-11-01 00:00:00"
> 
> Duncan Murdoch
> 
> >
> > ssdf<-read.csv(text="data_POSIX,Sensor_code,value
> > 2002-11-01 00:00:01,1694,7.2
> > 2002-11-01 00:00:00,1723,10.8",
> > stringsAsFactors=FALSE)
> > ssdf$data_POSIX<-as.POSIXct(ssdf$data_POSIX,"%Y-%m-%d HH:MM:SS")
> ssdf
> >
> > data_POSIX Sensor_code value
> > 1 2002-11-01 00:00:011694   7.2
> > 2 2002-11-01 00:00:001723  10.8
> >
> > but if there is a single small increment, they all show up.
> >
> > Jim
> >
> > On Tue, Nov 30, 2021 at 7:33 PM PIKAL Petr 
> wrote:
> >>
> >> Hi
> >>
> >> You probably has zero hours in all your data
> >>
> >> see
> >>> temp
> >> data_POSIX Sensor_code value
> >> 1 2002-11-01 00:00:001694   7.2
> >> 2 2002-11-01 00:00:001723  10.8
> >>
> >> without hours
> >>> as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S",
> >>> tz="Etc/GMT-1")
> >> [1] "2002-11-01 +01" "2002-11-01 +01"
> >>
> >> add value to hours
> >>> fix(temp)
> >>> temp
> >> data_POSIX Sensor_code value
> >> 1 2002-11-01 00:01:001694   7.2
> >> 2 2002-11-01 00:00:001723  10.8
> >>
> >> Voila, hours are back.
> >>> as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S",
> >>> tz="Etc/GMT-1")
> >> [1] "2002-11-01 00:01:00 +01" "2002-11-01 00:00:00 +01"
> >>
> >> So nothing wrong in uyour code, hours are there but they are probably
> not printed to console and hours are there but hidden.
> >>
> >> Cheers
> >> Petr
> >>
> >>> -Original Message-
> >>> From: R-help  On Behalf Of Stefano
> >>> Sofia
> >>> Sent: Tuesday, November 30, 2021 9:20 AM
> >>> To: r-help mailing list 
> >>> Subject: [R] converting to POSIXct
> >>>
> >>> Dear R-list users,
> >>> I thought I was able to manage easily POSIXct, but this is not true.
> >>> I am not going to load the input txt file because I know that
> >>> attachments are not allowed. The structure of my input txt file is
> >>>
> >>> data_POSIX,Sensor_code,value
> >>> 2002-11-01 00:00:00,1694,7.2
> >>> 2002-11-01 00:00:00,1723,10.8
> >>> ...
> >>>
> >>> I load it with
> >>> myfile <- read.table(file="mypath/myfile.txt", header = TRUE,
> >>> sep=",", dec = ".", stringsAsFactors = FALSE)
> >>>
> >>> When I try to convert the data_POSIX column (which is a character)
> >>> to POSIXct with
> >>>
> >>> myfile$data_POSIX <- as.POSIXct(myfile$data_POSIX, format =
> >>> "%Y-%m-%d %H:%M:%S", tz="Etc/GMT-1")
> >>>
> >>> the outupt is
> >>>
> >>> 2002-11-01 1694 7.2
> >>> 2002-11-01 1723 10.8
> >>> ...
> >>>
> >>> Why I keep loosing hours, minutes and seconds? Wher eis my mistake
> >>> or my misunderstanding?
> >>>
> >>> Sorry again if I have not been able to reproduce the R code, and
> >>> thank you for your support.
> >>> Stefano
> >>>
> >>>   (oo)
> >>> --oOO--(

Re: [R] converting to POSIXct

2021-11-30 Thread Duncan Murdoch

On 30/11/2021 3:41 a.m., Jim Lemon wrote:

Hi,
Petr is right. Apparently as.POSIXct drops the smallest increments if
all are zero:


That's not as.POSIXct doing anything:  there's no way to drop 
increments, the POSIXct format records a number of seconds and that 
can't be changed.


What is happening is simply the default formatting.

Be explicit about the format if you want to see the seconds, e.g.

> format(ssdf$data_POSIX, format = '%Y-%m-%d %H:%M:%S')
[1] "2002-11-01 00:00:00" "2002-11-01 00:00:00"

Duncan Murdoch



ssdf<-read.csv(text="data_POSIX,Sensor_code,value
2002-11-01 00:00:01,1694,7.2
2002-11-01 00:00:00,1723,10.8",
stringsAsFactors=FALSE)
ssdf$data_POSIX<-as.POSIXct(ssdf$data_POSIX,"%Y-%m-%d HH:MM:SS")
ssdf

data_POSIX Sensor_code value
1 2002-11-01 00:00:011694   7.2
2 2002-11-01 00:00:001723  10.8

but if there is a single small increment, they all show up.

Jim

On Tue, Nov 30, 2021 at 7:33 PM PIKAL Petr  wrote:


Hi

You probably has zero hours in all your data

see

temp

data_POSIX Sensor_code value
1 2002-11-01 00:00:001694   7.2
2 2002-11-01 00:00:001723  10.8

without hours

as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S", tz="Etc/GMT-1")

[1] "2002-11-01 +01" "2002-11-01 +01"

add value to hours

fix(temp)
temp

data_POSIX Sensor_code value
1 2002-11-01 00:01:001694   7.2
2 2002-11-01 00:00:001723  10.8

Voila, hours are back.

as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S", tz="Etc/GMT-1")

[1] "2002-11-01 00:01:00 +01" "2002-11-01 00:00:00 +01"

So nothing wrong in uyour code, hours are there but they are probably not 
printed to console and hours are there but hidden.

Cheers
Petr


-----Original Message-
From: R-help  On Behalf Of Stefano Sofia
Sent: Tuesday, November 30, 2021 9:20 AM
To: r-help mailing list 
Subject: [R] converting to POSIXct

Dear R-list users,
I thought I was able to manage easily POSIXct, but this is not true.
I am not going to load the input txt file because I know that attachments are
not allowed. The structure of my input txt file is

data_POSIX,Sensor_code,value
2002-11-01 00:00:00,1694,7.2
2002-11-01 00:00:00,1723,10.8
...

I load it with
myfile <- read.table(file="mypath/myfile.txt", header = TRUE, sep=",", dec =
".", stringsAsFactors = FALSE)

When I try to convert the data_POSIX column (which is a character) to
POSIXct with

myfile$data_POSIX <- as.POSIXct(myfile$data_POSIX, format = "%Y-%m-%d
%H:%M:%S", tz="Etc/GMT-1")

the outupt is

2002-11-01 1694 7.2
2002-11-01 1723 10.8
...

Why I keep loosing hours, minutes and seconds? Wher eis my mistake or my
misunderstanding?

Sorry again if I have not been able to reproduce the R code, and thank you
for your support.
Stefano

  (oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy Meteo Section Snow Section Via del
Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff: +39 071 806 7743
E-mail: stefano.so...@regione.marche.it
---Oo-oO



AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confidenziali, pertanto è destinato solo a persone autorizzate
alla ricezione. I messaggi di posta elettronica per i client di Regione Marche
possono contenere informazioni confidenziali e con privilegi legali. Se non si è
il destinatario specificato, non leggere, copiare, inoltrare o archiviare questo
messaggio. Se si è ricevuto questo messaggio per errore, inoltrarlo al
mittente ed eliminarlo completamente dal sistema del proprio computer. Ai
sensi dell’art. 6 della DGR n. 1394/2008 si segnala che, in caso di necessità ed
urgenza, la risposta al presente messaggio di posta elettronica può essere
visionata da persone estranee al destinatario.
IMPORTANT NOTICE: This e-mail message is intended to be received only by
persons entitled to receive the confidential information it may contain. E-mail
messages to clients of Regione Marche may contain information that is
confidential and legally privileged. Please do not read, copy, forward, or store
this message unless you are an intended recipient of it. If you have received
this message in error, please forward it to the sender and delete it
completely from your computer system.

--
Questo messaggio  stato analizzato da Libraesva ESG ed  risultato non infetto.
This message was scanned by Libraesva ESG and is believed to be clean.


   [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-pr

Re: [R] converting to POSIXct

2021-11-30 Thread Jim Lemon
Hi,
Petr is right. Apparently as.POSIXct drops the smallest increments if
all are zero:

ssdf<-read.csv(text="data_POSIX,Sensor_code,value
2002-11-01 00:00:01,1694,7.2
2002-11-01 00:00:00,1723,10.8",
stringsAsFactors=FALSE)
ssdf$data_POSIX<-as.POSIXct(ssdf$data_POSIX,"%Y-%m-%d HH:MM:SS")
ssdf

   data_POSIX Sensor_code value
1 2002-11-01 00:00:011694   7.2
2 2002-11-01 00:00:001723  10.8

but if there is a single small increment, they all show up.

Jim

On Tue, Nov 30, 2021 at 7:33 PM PIKAL Petr  wrote:
>
> Hi
>
> You probably has zero hours in all your data
>
> see
> > temp
>data_POSIX Sensor_code value
> 1 2002-11-01 00:00:001694   7.2
> 2 2002-11-01 00:00:001723  10.8
>
> without hours
> > as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S", tz="Etc/GMT-1")
> [1] "2002-11-01 +01" "2002-11-01 +01"
>
> add value to hours
> > fix(temp)
> > temp
>data_POSIX Sensor_code value
> 1 2002-11-01 00:01:001694   7.2
> 2 2002-11-01 00:00:001723  10.8
>
> Voila, hours are back.
> > as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S", tz="Etc/GMT-1")
> [1] "2002-11-01 00:01:00 +01" "2002-11-01 00:00:00 +01"
>
> So nothing wrong in uyour code, hours are there but they are probably not 
> printed to console and hours are there but hidden.
>
> Cheers
> Petr
>
> > -Original Message-
> > From: R-help  On Behalf Of Stefano Sofia
> > Sent: Tuesday, November 30, 2021 9:20 AM
> > To: r-help mailing list 
> > Subject: [R] converting to POSIXct
> >
> > Dear R-list users,
> > I thought I was able to manage easily POSIXct, but this is not true.
> > I am not going to load the input txt file because I know that attachments 
> > are
> > not allowed. The structure of my input txt file is
> >
> > data_POSIX,Sensor_code,value
> > 2002-11-01 00:00:00,1694,7.2
> > 2002-11-01 00:00:00,1723,10.8
> > ...
> >
> > I load it with
> > myfile <- read.table(file="mypath/myfile.txt", header = TRUE, sep=",", dec =
> > ".", stringsAsFactors = FALSE)
> >
> > When I try to convert the data_POSIX column (which is a character) to
> > POSIXct with
> >
> > myfile$data_POSIX <- as.POSIXct(myfile$data_POSIX, format = "%Y-%m-%d
> > %H:%M:%S", tz="Etc/GMT-1")
> >
> > the outupt is
> >
> > 2002-11-01 1694 7.2
> > 2002-11-01 1723 10.8
> > ...
> >
> > Why I keep loosing hours, minutes and seconds? Wher eis my mistake or my
> > misunderstanding?
> >
> > Sorry again if I have not been able to reproduce the R code, and thank you
> > for your support.
> > Stefano
> >
> >  (oo)
> > --oOO--( )--OOo--
> > Stefano Sofia PhD
> > Civil Protection - Marche Region - Italy Meteo Section Snow Section Via del
> > Colle Ameno 5
> > 60126 Torrette di Ancona, Ancona (AN)
> > Uff: +39 071 806 7743
> > E-mail: stefano.so...@regione.marche.it
> > ---Oo-oO
> >
> > 
> >
> > AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
> > informazioni confidenziali, pertanto è destinato solo a persone autorizzate
> > alla ricezione. I messaggi di posta elettronica per i client di Regione 
> > Marche
> > possono contenere informazioni confidenziali e con privilegi legali. Se non 
> > si è
> > il destinatario specificato, non leggere, copiare, inoltrare o archiviare 
> > questo
> > messaggio. Se si è ricevuto questo messaggio per errore, inoltrarlo al
> > mittente ed eliminarlo completamente dal sistema del proprio computer. Ai
> > sensi dell’art. 6 della DGR n. 1394/2008 si segnala che, in caso di 
> > necessità ed
> > urgenza, la risposta al presente messaggio di posta elettronica può essere
> > visionata da persone estranee al destinatario.
> > IMPORTANT NOTICE: This e-mail message is intended to be received only by
> > persons entitled to receive the confidential information it may contain. 
> > E-mail
> > messages to clients of Regione Marche may contain information that is
> > confidential and legally privileged. Please do not read, copy, forward, or 
> > store
> > this message unless you are an intended recipient of it. If you have 
> > received
> > this message in error, please forward it to the sender and delete it
> > completely from 

Re: [R] converting to POSIXct

2021-11-30 Thread PIKAL Petr
Hi

You probably has zero hours in all your data

see
> temp
   data_POSIX Sensor_code value
1 2002-11-01 00:00:001694   7.2
2 2002-11-01 00:00:001723  10.8

without hours
> as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S", tz="Etc/GMT-1")
[1] "2002-11-01 +01" "2002-11-01 +01"

add value to hours
> fix(temp)
> temp
   data_POSIX Sensor_code value
1 2002-11-01 00:01:001694   7.2
2 2002-11-01 00:00:001723  10.8

Voila, hours are back.
> as.POSIXct(temp$data_POSIX, format = "%Y-%m-%d %H:%M:%S", tz="Etc/GMT-1")
[1] "2002-11-01 00:01:00 +01" "2002-11-01 00:00:00 +01"

So nothing wrong in uyour code, hours are there but they are probably not 
printed to console and hours are there but hidden. 

Cheers
Petr

> -Original Message-
> From: R-help  On Behalf Of Stefano Sofia
> Sent: Tuesday, November 30, 2021 9:20 AM
> To: r-help mailing list 
> Subject: [R] converting to POSIXct
> 
> Dear R-list users,
> I thought I was able to manage easily POSIXct, but this is not true.
> I am not going to load the input txt file because I know that attachments are
> not allowed. The structure of my input txt file is
> 
> data_POSIX,Sensor_code,value
> 2002-11-01 00:00:00,1694,7.2
> 2002-11-01 00:00:00,1723,10.8
> ...
> 
> I load it with
> myfile <- read.table(file="mypath/myfile.txt", header = TRUE, sep=",", dec =
> ".", stringsAsFactors = FALSE)
> 
> When I try to convert the data_POSIX column (which is a character) to
> POSIXct with
> 
> myfile$data_POSIX <- as.POSIXct(myfile$data_POSIX, format = "%Y-%m-%d
> %H:%M:%S", tz="Etc/GMT-1")
> 
> the outupt is
> 
> 2002-11-01 1694 7.2
> 2002-11-01 1723 10.8
> ...
> 
> Why I keep loosing hours, minutes and seconds? Wher eis my mistake or my
> misunderstanding?
> 
> Sorry again if I have not been able to reproduce the R code, and thank you
> for your support.
> Stefano
> 
>  (oo)
> --oOO--( )--OOo--
> Stefano Sofia PhD
> Civil Protection - Marche Region - Italy Meteo Section Snow Section Via del
> Colle Ameno 5
> 60126 Torrette di Ancona, Ancona (AN)
> Uff: +39 071 806 7743
> E-mail: stefano.so...@regione.marche.it
> ---Oo-oO
> 
> 
> 
> AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
> informazioni confidenziali, pertanto è destinato solo a persone autorizzate
> alla ricezione. I messaggi di posta elettronica per i client di Regione Marche
> possono contenere informazioni confidenziali e con privilegi legali. Se non 
> si è
> il destinatario specificato, non leggere, copiare, inoltrare o archiviare 
> questo
> messaggio. Se si è ricevuto questo messaggio per errore, inoltrarlo al
> mittente ed eliminarlo completamente dal sistema del proprio computer. Ai
> sensi dell’art. 6 della DGR n. 1394/2008 si segnala che, in caso di necessità 
> ed
> urgenza, la risposta al presente messaggio di posta elettronica può essere
> visionata da persone estranee al destinatario.
> IMPORTANT NOTICE: This e-mail message is intended to be received only by
> persons entitled to receive the confidential information it may contain. 
> E-mail
> messages to clients of Regione Marche may contain information that is
> confidential and legally privileged. Please do not read, copy, forward, or 
> store
> this message unless you are an intended recipient of it. If you have received
> this message in error, please forward it to the sender and delete it
> completely from your computer system.
> 
> --
> Questo messaggio  stato analizzato da Libraesva ESG ed  risultato non infetto.
> This message was scanned by Libraesva ESG and is believed to be clean.
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


[R] converting to POSIXct

2021-11-30 Thread Stefano Sofia
Dear R-list users,
I thought I was able to manage easily POSIXct, but this is not true.
I am not going to load the input txt file because I know that attachments are 
not allowed. The structure of my input txt file is

data_POSIX,Sensor_code,value
2002-11-01 00:00:00,1694,7.2
2002-11-01 00:00:00,1723,10.8
...

I load it with
myfile <- read.table(file="mypath/myfile.txt", header = TRUE, sep=",", dec = 
".", stringsAsFactors = FALSE)

When I try to convert the data_POSIX column (which is a character) to POSIXct 
with

myfile$data_POSIX <- as.POSIXct(myfile$data_POSIX, format = "%Y-%m-%d 
%H:%M:%S", tz="Etc/GMT-1")

the outupt is

2002-11-01 1694 7.2
2002-11-01 1723 10.8
...

Why I keep loosing hours, minutes and seconds? Wher eis my mistake or my 
misunderstanding?

Sorry again if I have not been able to reproduce the R code, and thank you for 
your support.
Stefano

 (oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff: +39 071 806 7743
E-mail: stefano.so...@regione.marche.it
---Oo-oO



AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere 
informazioni confidenziali, pertanto è destinato solo a persone autorizzate 
alla ricezione. I messaggi di posta elettronica per i client di Regione Marche 
possono contenere informazioni confidenziali e con privilegi legali. Se non si 
è il destinatario specificato, non leggere, copiare, inoltrare o archiviare 
questo messaggio. Se si è ricevuto questo messaggio per errore, inoltrarlo al 
mittente ed eliminarlo completamente dal sistema del proprio computer. Ai sensi 
dell’art. 6 della DGR n. 1394/2008 si segnala che, in caso di necessità ed 
urgenza, la risposta al presente messaggio di posta elettronica può essere 
visionata da persone estranee al destinatario.
IMPORTANT NOTICE: This e-mail message is intended to be received only by 
persons entitled to receive the confidential information it may contain. E-mail 
messages to clients of Regione Marche may contain information that is 
confidential and legally privileged. Please do not read, copy, forward, or 
store this message unless you are an intended recipient of it. If you have 
received this message in error, please forward it to the sender and delete it 
completely from your computer system.

--
Questo messaggio  stato analizzato da Libraesva ESG ed  risultato non infetto.
This message was scanned by Libraesva ESG and is believed to be clean.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.