[R] Importing Time Series Data for an R Beginner

ManInMoon xmoon2000 at googlemail.com
Thu Mar 11 21:21:05 CET 2010


z<-read.table("C:/yourfile.txt",header=TRUE,as.is=TRUE);
zdates<-as.POSIXct(strptime(paste(z[,2],z[,3]), "%m/%d/%Y
%H:%M:%S"),origin="1970-01-01" );

I would then convert z from a dataframe to a numeric matrix, and put zdates
in there as numeric too.

zm<-cbind(z[,1],as.numeric(zdates),z[,4])

I am a beginner too - but have just been through this.
-- 
View this message in context: http://n4.nabble.com/Importing-Time-Series-Data-for-an-R-Beginner-tp1589685p1589696.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list