On 12-Mar-04 Manica wrote:
> I want to extract the first non-zero digit of any vector, as for
> example
> from a<-runif(100,0,1).
> Tried it using grep (...) but didnīt work.
> 
> Any help is very much appreciated.
> Thanks,
> Manica

runif will put "real" numbers in 'a'. It is highly likely that
any of them will be zero, and in any case they are not "digits"
(though in their decimal representation many of them will have
at least one "0" in the string of digits for each one).

So it is not clear what you mean by "the first non-zero digit
of any vector". Please clarify!

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <[EMAIL PROTECTED]>
Fax-to-email: +44 (0)870 167 1972
Date: 15-Mar-04                                       Time: 10:40:44
------------------------------ XFMail ------------------------------

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to