tags:

views:

372

answers:

1

Hi

I've imported a csv file with lots of columns and sections of data.

v <- read.csv2("200109.csv", header=TRUE, sep=",", skip="6", na.strings=c(""))

The layout of the file is something like this:

Dataset1
time, data, .....
0       0
0       <NA>
0       0

Dataset2
time, data, .....
00:00   0
0       <NA>
0       0

(The headers of the different datasets is exactly the same.

Now, I can plot the first dataset with:

plot(as.numeric(as.character(v$Calls.served.by.agent[1:30])), type="l")

I am curious if there is a better way to:

  1. Get all the numbers read as numbers, without having to convert.

  2. Address the different datasets in the file, in some meaningfull way.

Any hints would be appreciated. Thank you.


Status update:

I haven't really found a good solution yet in R, but I've started writing a script in Lua to seperate each individual time-series into a seperate file. I'm leaving this open for now, because I'm curious how well R will deal with all these files. I'll get 8 files per day.

+2  A: 
Jouni K. Seppänen