[R] importing and filtering time series data

2011-04-29 Thread Joel Reymont
Folks, I'm new to R and would like to use it to analyze web server performance data. I collect the data in this CSV format: 1304083104.41,Y,668.856249809 1304083104.41,Y,348.143193007 First column is a timestamp, rows with N instead of Y need to be skipped and the last column has the same fo

[R] microsecond timestamp support

2011-05-01 Thread Joel Reymont
Does R have support for microseconds in timestamps, e.g. when reading this in "Time","Include","Kind","Duration" 2011-04-01 14:20:36.368324,Y,U,1.03238296509 2011-04-01 14:20:35.342732,Y,C,0.0252721309662 2011-04-01 14:20:34.337209,Y,R,0.00522899627686 Thanks, Joel --

Re: [R] importing and filtering time series data

2011-05-02 Thread Joel Reymont
My current code looks like this. Anything that can be improved? #! /usr/bin/rscript # install.packages(c('zoo','xts')) library(zoo) library(xts) req_stats <- function(data, type = NA) { if (is.na(type)) csv <- data else # subset of data matching our request type csv <- subset(da