Re: [R] Transforming simulation data which is spread across many files into a barplot

2010-06-11 Thread Gabor Grothendieck
Try this: base <- "file" # replace as appropriate N <- 50 filenames <- paste(base, seq_len(N)*100, ".log", sep = "") mat <- sapply(filenames, function(fn) colMeans(read.table(fn, col.names = c("Sent", "Received"))) ) barplot(mat) On Fri, Jun 11, 2010 at 2:32 PM, Ian Bentley wrote: > I'm

Re: [R] Transforming simulation data which is spread across many files into a barplot

2010-06-11 Thread Hadley Wickham
On Fri, Jun 11, 2010 at 1:32 PM, Ian Bentley wrote: > I'm an R newbie, and I'm just trying to use some of it's graphing > capabilities, but I'm a bit stuck - basically in massaging the already > available data into a format R likes. > > I have a simulation environment which produces logs, which re