Skip to content
Prev 6597 / 15274 Next

reading forex data zoo or xts?

On Sat, Sep 4, 2010 at 10:49 AM, Andres Susrud <andres.susrud at gmail.com> wrote:
read.zoo can read date and time in two columns by specifying a vector
or list to index. Be sure you have the latest version of zoo since
this is a feature that was added in recent versions of the package.

Lines <- "Date Time Value
01/23/2000 10:12:15 12.12
01/24/2000 11:10:00 15.00"

library(zoo)
library(chron)
z <- read.zoo(textConnection(Lines), header = TRUE,
	index = list(1, 2), FUN = chron)

read.zoo can read input data with two columns for time.