>
> ...I discovered that when R attempts to sample from an object with only one
> number it does not
> reproduce/report the number but instead chooses a random number between 1
> and that number.
>

This is the documented behavior.

In my opinion, it is a design error, but changing it would no doubt break
lots of code.

As a general rule, the designers of R seem to have preferred convenience to
consistency, which often makes things easier or more concise, but sometimes
causes unfortunate surprises like this.

           -s

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to