From: Stavros Macrakis <macrakis_at_alum.mit.edu>

Date: Mon, 10 Nov 2008 16:28:38 -0500

}

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 10 Nov 2008 - 21:31:30 GMT

Date: Mon, 10 Nov 2008 16:28:38 -0500

I have a dataset of about 10^6 rows, each consisting of a timestamp,
several factors, a string, some integers, and some floats.

slice$day, function(x) quantile(x,c(.25,.50,.75)));... ) , ...)

# returns a tagged list of tagged vectors

# list("2008-10-07" = c("25%" = .05, "50%" = .47,

# convert to a data frame -- is there some mapping function to do this? fr <- data.frame( day = to.time(names(quarts)), # strings back to dates (!)

"25%" = sapply(quarts, function(x) x[[1]] ), # !! "50%" = sapply(quarts, function(x) x[[2]] ), "75%" = sapply(quarts, function(x) x[[3]] ) );for (i in 2:4) { plot( fr$day, res[[2]], type="l", ylim= c( 0, max(pmax(fr[[1]],fr[[2]],fr[[3]] )) ));

# columns are now labelled "X25." etc. (!)

par(new=TRUE); }par(new=FALSE);

}

This works, but is pretty ugly in a variety of ways. What is the right way to do this?

-s

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 10 Nov 2008 - 21:31:30 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Tue 11 Nov 2008 - 03:30:24 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*