Hello everyone. When I execute the following in R> (18-46)/(45-93)[1] 0.5833333 I get small precision for what I am trying to deal with . Is it possible to increase the precision for this and for other operations? For example openoffice calc for this operation returns 0.58333333333333300000 I I would like to thank you for your help [[alternative HTML version deleted]]
?options On Wed, Oct 27, 2010 at 6:49 AM, Alaios <alaios at yahoo.com> wrote:> Hello everyone. > > When I execute the following in R >> (18-46)/(45-93) > [1] 0.5833333 > > I get small precision for what I am trying to deal with . ?Is it possible to > increase the precision for this and for other operations? > > For example openoffice calc for this operation returns > > > 0.58333333333333300000 > > > I > > > > > I would like to thank you for your help > > > > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Stephen Sefick ____________________________________ | Auburn University? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? | | Department of Biological Sciences? ? ? ? ?? | | 331 Funchess Hall? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | | Auburn, Alabama? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? | | 36849? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | |___________________________________| | sas0025 at auburn.edu? ? ? ? ? ? ? ? ? ? ? ? ? ?? | | http://www.auburn.edu/~sas0025? ? ? ? ? ?? | |___________________________________| Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods.? We are mammals, and have not exhausted the annoying little problems of being mammals. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? -K. Mullis "A big computer, a complex algorithm and a long time does not equal science." ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? -Robert Gentleman
On 27/10/2010 7:49 AM, Alaios wrote:> Hello everyone. > > When I execute the following in R > > (18-46)/(45-93) > [1] 0.5833333 > > I get small precision for what I am trying to deal with . Is it possible to > increase the precision for this and for other operations? > > For example openoffice calc for this operation returns > > > 0.58333333333333300000With options(digits=20) R will print 0.5833333333333334 which looks to me to be slightly more accurate than the OO value. But the internal value is unaffected by the options("digits") setting, it only affects printing. Duncan Murdoch> > I > > > > > I would like to thank you for your help > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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.
Hi, It is not a problem of precision but a problem of display. > options(digits=15) > (18-46)/(45-93) [1] 0.583333333333333 Alain On 27-Oct-10 13:49, Alaios wrote:> Hello everyone. > > When I execute the following in R >> (18-46)/(45-93) > [1] 0.5833333 > > I get small precision for what I am trying to deal with . Is it possible to > increase the precision for this and for other operations? > > For example openoffice calc for this operation returns > > > 0.58333333333333300000 > > > I > > > > > I would like to thank you for your help > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Universit? catholique de Louvain Bureau c.316 Voie du Roman Pays, 20 B-1348 Louvain-la-Neuve Belgium tel: +32 10 47 30 50