Skip to content
Prev 126961 / 398500 Next

Need some help

I really depends on what you want to plot.  You can plot the
cumulative count of the sign changes with:

x <- sample(c(0,1), 1000, TRUE)
plot(cumsum(x), type='l')

There are other things you can do.  You can get a rough histogram of
the length of the run by:
The decimal point is at the |

  1 | 00000000000000000000000000000000000000000000000000000000000000000000+201
  1 |
  2 | 00000000000000000000000000000000000000000000000000000000000000000000+60
  2 |
  3 | 00000000000000000000000000000000000000000000000000000
  3 |
  4 | 00000000000000000000000000000000000000
  4 |
  5 | 000000000
  5 |
  6 | 00000000
  6 |
  7 | 00000

With R, almost anything is possible.
On 10/15/07, azzza <azza.khogaliali at utoronto.ca> wrote: