> Sample gives an error if it is sampling a length one character
> vector:
>
> > sample('a', 1)
> Error in sample(x, size, replace, prob) : invalid first argument

>From the help page:

       x: Either a (numeric, complex, character or logical) vector of
          more than one element from which to choose, or a positive
          integer.

so this is as documented, hence not a bug.

[Re-created from the R-bugs page as my mail server is offline.]

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to