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
Here is one approach. It would be good to provide a reasonable sample of data:
> x <- unclass(Sys.time()) # today's date
> # create some data
> # increments by ~ 0.1 seconds
> len <- cumsum(runif(100, 0, 0.1))
> dataFile <- data.frame(time = x + len,
+flag = sample(c("Y",
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
3 matches
Mail list logo