Skip to content
Prev 3361 / 15274 Next

plot.xts: Error in parse.format(format[1]) : unrecognized format %b %d%n%H:%M:%S

Try plot.zoo as a workaround:

library(chron)
library(xts)

# read data creating xts object x
Lines <- "12/07/08 19:46:40,98.04
12/07/08 19:46:41,98.04
12/07/08 19:46:42,98.04
12/07/08 19:46:43,98.04
12/07/08 19:46:44,98.04
12/07/08 19:46:45,98.04
12/07/08 19:46:46,98.04
12/07/08 19:46:47,98.04
12/07/08 19:46:48,98.04
12/07/08 19:46:49,98.04
12/07/08 19:46:50,98.04"

z <- read.zoo(textConnection(Lines), sep = ",",
   FUN = as.chron, format = "%m/%d/%y %H:%M:%S")
x <- as.xts(z)

# plot it - first one gives error, second works
plot(x)
plot(as.zoo(x))
On Wed, Dec 10, 2008 at 3:57 PM, <davidr at rhotrading.com> wrote: