Thanks Gabor! Work perfectly! This is the code i used.

z <- read.zoo(lines, header = TRUE, index = list(1, 2), FUN = function(d,t)
as.POSIXct(paste(date,time), format = "%m/%d/%Y %H:%M"))

On Tue, Nov 23, 2010 at 8:07 PM, Gabor Grothendieck <ggrothendieck@gmail.com
> wrote:

> On Tue, Nov 23, 2010 at 7:56 PM, Nikos Rachmanis
> <nikos.rachmanis@gmail.com> wrote:
> > Hi Gabor,
> > Thanks very much for the suggestion. It worked well until the point that
> i
> > tried to plot the xts object. here is my code and the error message.
> > lines<-data.frame(date,time,open,high, low,close) #create a dataframe
> with
> > all the variables
> > z <- read.zoo(lines, header = TRUE, index = list(1, 2), FUN = function(d,
> t)
> > as.chron(paste(as.Date(chron(d)), t))) #create the zoo object
> > plot(z) # works fine
> > x<-as.xts(z) #works fine
> > plot(x)
> > Error in parse.format(format[1]) : unrecognized format %b %d %H:%M
> > any ideas?
> > Thanks!
> >
>
> Probably a bug plotting chron objects in xts.   Either pot it with zoo
> or use POSIXct and plot it with xts:
>
> plot(z$C)
>
> #  or
>
> z <- read.zoo(textConnection(Lines), header = TRUE, index = list(1, 2),
>        FUN = function(...) as.POSIXct(paste(...), format = "%m/%d/%Y
> %H:%M"))
> x <- as.xts(z)
> plot(x)
>
>
> --
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com
>

	[[alternative HTML version deleted]]

