[R] What's wrong with my code? (Edited version-added my data)

2011-07-12 Thread Susie
I've written out codes for one particular file, and now I want to generate the same kind of graphs and files for the rest of similar data files. For example, a file 8.csv would look like such: enc_callee inout o_duration type A out 342 de B in 234 de C

Re: [R] What's wrong with my code? (Edited version-added my data)

2011-07-12 Thread Joshua Wiley
Dear Susie, See inline for some suggestions, but generally, I think you would benefit from breaking this down into smaller pieces. The error you are getting indicates the problem has to do with the plotting, but that will be trickier to isolate while also dealing with reading in data, looping,

Re: [R] What's wrong with my code? (Edited version-added my data)

2011-07-12 Thread Susie
Hey Josh, Thank you so much for the help! Now I have edited my codes--breaking into smaller pieces:) R does not state the error again:) However, the problem comes, please see my codes below-- You've suggested earlier that I should move the eight part outside the loop; I changed the eight

Re: [R] What's wrong with my code? (Edited version-added my data)

2011-07-12 Thread Sarah Goslee
Take a closer look at your R code. Each loop is returning only the last value, so you're doing the same thing over and over for the last value from the previous loop. Write just the code for *one* set of graphs. Look at what needs to change to do the next set. Write a function that takes those

Re: [R] What's wrong with my code? (Edited version-added my data)

2011-07-12 Thread Joshua Wiley
Dear Susie, I'm glad the pieces are working. Sorry if I wasn't clear before, when I said break down into smaller pieces, I meant for testing and figuring out what's wrong. If you have everything in separate loops, they will be completed individually, so reading all the datasets will be done