[R] readcsvIts() to create irregular time series

Jan Verbesselt Jan.Verbesselt at agr.kuleuven.ac.be
Mon Sep 1 16:00:27 CEST 2003


Dear,

Thanks for the previous tips about 'its' for importing the following
data.
5/10/1998,7
5/11/1998,5
5/12/1998,2
5/14/1998,1
5/15/1998,1
5/19/1998,1
5/20/1998,1

1. When using the following command;
test<-readcsvIts('Fires98.csv',informat=its.format("%m/%d/%Y"),header=FA
LSE)

the function reads in the data from the csv file as;
           V2
05/10/1998  7
05/11/1998  5

When testing if it's a its object
is.its(test) 
the result is FALSE.
When do you use informat or outformat? 
What goes wrong?

2. When reading in the data as a table;
m1 <- read.table('Fires98.csv',header=FALSE, sep=",", dec=".")
          V1 V2
1  5/10/1998  7
2  5/11/1998  5
...
test2 <- its(m1,dates=as.POSIXct(x=strptime(dimnames(V1)[[1]]
format=its.format("%m/%d/%Y"))) )...Doesn't work! 

I have difficulties defining the first V1 column as its object.

Thanks in advance for helping me out,
Jan



________________________________________________________________________
__
Jan Verbesselt 
Research Associate 
Lab of Geomatics and Forest Engineering K.U. Leuven
Vital Decosterstraat 102. B-3000 Leuven Belgium 
Tel:+32-16-329750 
Fax: +32-16-329760
http://perswww.kuleuven.ac.be/~u0027178/VCard/mycard.php?name=janv
http://gloveg.kuleuven.ac.be/
________________________________________________________________________
__




More information about the R-help mailing list