Hello  again

I do apologize for the previous email without any useful information that
can lead to an answer.  To those who felt offended by "to no avail", I do
apologize again.  I guess I will be always a newbie as far as R is
concerned.


The date format was wrong and although I have tried to use different formats
I could not get the result I wanted.  So I went back to the file and changed
to a format that R can understand (Please understand that R is very likely
to have package that I might be unaware of).  Now all dates are

> class(data$TempDate)
[1] "POSIXct" "POSIXt"
> data$TempDate[1:2]
[1] "2010-06-27 00:00:00 BRT" "2010-06-27 00:01:00 BRT"

If I issue the command as.Date(data$TempDate[2]), the information on hour,
minute and second is lost

as.Date(data$TempDate[2])
[1] "2010-06-27"

If I use data$TempDate in a zoo object, I got the following msg

some methods for "zoo" objects do not work if the index entries in 'order.by'
are not unique

If I issue plot(zoo object), the result is a mess since many values do not
have an unique entry (as expected).

How can I use the information on data$TempDate to create unique indexes for
zoo objects and the like?

Many thanks.

Ed

PS. If the problem is not clearly stated, please be patient and tell me what
is obscure and needs clarification.

On Tue, Jul 26, 2011 at 6:49 PM, Eduardo M. A. M.Mendes <
emammendes@gmail.com> wrote:

> Hello
>
> I have a huge file (not an R-file) in which the first column is a string
> with date, hour, minutes and seconds (For instance, "31-Jul-2010
> 23:59:00").
>
> I tried as.Date but the error msg was "Error in charToDate(x) :
>  character string is not in a standard unambiguous format".
>
> I have checked the help for the function as well as date but to no avail.
>
> How can that sort of string be transformed to something useful in R?
>
> Many thanks
>
> Ed
>
>

	[[alternative HTML version deleted]]

