Re: [R] breaking a loop in R

2009-07-04 Thread NatsS
Hello, Please could someone explain break and next?? Is there a way to break a loop that is not the innermost loop?? for example: #= dim A = 1000 x 3 dim B = 2000 x 3 for (a in 1:1000){ for (b in 1:2000){ expr = intersect(A[a,1]:A[a,2],B[b,1]:B[b,2])

[R] Plot error

2009-05-28 Thread NatsS
Hello, I am an R amateur. I want to plot data such that the 3 time points(a,b,c) lie on the X-axis and the values of these times points are on Y-axis for n samples (e.g.100). So, I have an object x, dim 100 4, it is a dataframe (when checked the class) x = name a b c 1