[R-SIG-Finance] Reading xts data from csv

intertodd louisinuq at yahoo.com.au
Fri Dec 28 03:34:50 CET 2012


I had the same question before..what i did is:

first you put the data and date in two csv files before you run the code:

z=as.matrix(read.csv("data.csv",header=F))
x=as.matrix(read.csv("date.csv",header=F))
rownames(z)=c(x[,1])
y=as.xts(z)

the you will be able to have the y which is ts with date..

hope this helps



--
View this message in context: http://r.789695.n4.nabble.com/Reading-xts-data-from-csv-tp4653991p4654102.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list