I think this is what you're looking for. It's from example 4 in the zoo vignette. You still get the warning because you still have duplicate Date, Time combos
library(zoo)
library(chron)
f <- function(d, t) as.chron(paste(as.Date(chron(d)), t))
read.zoo("EKSO_0.txt", header = TRUE, sep = ",", index.column = 1:2, FUN = f)
## Price Size
## (02/18/14 05:06:13) 49.60 200
## (02/18/14 05:06:13) 49.60 200
## (02/18/14 05:06:13) 49.60 200
## (02/18/14 05:06:14) 49.60 200
## (02/18/14 05:06:14) 49.60 193
## (02/18/14 05:44:41) 49.62 100
## (02/18/14 06:26:36) 49.52 100
## (02/18/14 06:26:36) 49.52 500
## (02/18/14 07:09:29) 49.60 100
## (02/18/14 07:56:40) 49.56 300
## (02/18/14 07:56:40) 49.55 400
## (02/18/14 07:56:41) 49.54 200
## (02/18/14 07:56:43) 49.55 100
## (02/18/14 07:56:43) 49.55 100
## (02/18/14 07:56:50) 49.55 100
## (02/18/14 07:57:12) 49.53 100
## (02/18/14 07:57:12) 49.51 2200
## (02/18/14 07:57:12) 49.51 100
## (02/18/14 07:57:12) 49.50 200
## Warning message:
## In zoo(rval3, ix) :
## some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique