[R] Multiple ecdf plots?

From: weller <weller.emmons_at_gmail.com>
Date: Thu, 17 Jun 2010 13:46:28 -0700 (PDT)

I have a csv file that has approximately 50k rows. In the first value of each row, a file name is listed, and there are 162 different file names. At the end of each row, there is a number value. What I would like to be able to do is for the 162 different files (or we could call them categories), is compute the ecdf for the values within that category. Then plot the ecdf for each file on the same graph. Essentially, it would look something like http://www-stat.stanford.edu/~jtaylo/courses/stats202/R/chap3_data_exploration/iris_ecdf.png, but instead of the 3 lines, it would show 162. They don't have to be different colors, and the number of records in each file category changes. I was considering using a matrix and adding to it via a loop, but couldn't quite get it to work. This is what I have right now.

thwop <- read.csv("real_unmod_estimated_pI.csv", header=TRUE) filelist <- levels(thwop$Source)
rig=matrix(nrows=162)

for (i in filelist)
{

   thug <- subset(thwop, thwop$Source == i)    rig[i,length(ecdf(thug$Estimated.pI))]=ecdf(thug$Estimated.pI) }
rig

Any help would be appreciated

-- 
View this message in context: http://r.789695.n4.nabble.com/Multiple-ecdf-plots-tp2259465p2259465.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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 Fri 18 Jun 2010 - 03:06:25 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 Fri 18 Jun 2010 - 04:20:31 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.

list of date sections of archive