[R] A problem about all possible sequences

Paul Smith
2007-04-17T14:26:15Z

Dear All

Suppose a sequence of length 10 generated by the following rule: the
first element is 0 with 50% of probability or 1 with the same
probability; the second element likewise; and so on.

Is there some R command to obtain all possible different sequences
formed by the above rule? I am aware that one could write a small
program to do that, but I am speculating about whether a command is
already existent.

Thanks in advance,

Paul