[R] Bug in options(digits=n)??
Joshua Wiley
jwiley.psych at gmail.com
Fri Nov 18 10:28:20 CET 2011
Hi Ravi,
That is expected. Please read the documentation for ?options.
Specifically, note that digits sets the significant digits, this may
not always be the number of decimals printed.
Also, I recommend updating your version of R.
Cheers,
Josh
On Fri, Nov 18, 2011 at 12:25 AM, Ravi Kulkarni <ravi.kulk at gmail.com> wrote:
> This is in version 2.10.1
>
>> sqrt(3)
> [1] 1.732051
>> 6/7
> [1] 0.8571429
>> options(digits=3)
>> sqrt(3)
> [1] 1.73
>> 6/7
> [1] 0.857
>> sqrt(7)
> [1] 2.65
>> 7/9
> [1] 0.778
>
> Ravi
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Bug-in-options-digits-n-tp4082537p4082537.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, ATS Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/
More information about the R-help
mailing list