Hi everybody!
I'm new to this list and also to the R program.
I'd like to know if there is a function able to convert results into
Fractional form like my scientific calculator have. For example:
> 1/3
[1] 0.333
> function_that_return_a_fraction_from_numbers(0.333)
[1] 1/3
Thanks
Maur
Welcome (benvenuto),
see "fractions" in library MASS
es:
> fractions(1/2)
[1] 1/2
Ciao
Stefano
On Thu, Sep 13, 2007 at 04:54:01PM +0200, Mauro Arnoldi wrote:
Hi everybody!
I'm new to this list and also to the R program.
I'd like to know if there is a function able to convert results into
look at ?fractions
> fractions(.3)
[1] 1/3
On Thu, 13 Sep 2007, Mauro Arnoldi wrote:
> Hi everybody!
> I'm new to this list and also to the R program.
>
> I'd like to know if there is a function able to convert results into
> Fractional form like my scientific calculator have. For example:
>
Mauro Arnoldi wrote:
> Hi everybody!
> I'm new to this list and also to the R program.
>
> I'd like to know if there is a function able to convert results into
> Fractional form like my scientific calculator have. For example:
>
>> 1/3
> [1] 0.333
>
>> function_that_return_a_fraction_from
Try:
library(MASS)
?fractions
On 9/13/07, Mauro Arnoldi <[EMAIL PROTECTED]> wrote:
> Hi everybody!
> I'm new to this list and also to the R program.
>
> I'd like to know if there is a function able to convert results into
> Fractional form like my scientific calculator have. For example:
>
> > 1
On Thu, 13 Sep 2007, Mauro Arnoldi wrote:
> Hi everybody!
> I'm new to this list and also to the R program.
>
> I'd like to know if there is a function able to convert results into
> Fractional form like my scientific calculator have. For example:
>
>> 1/3
> [1] 0.333
>
>> function_that_return
11:34 AM
To: Mauro Arnoldi
Cc: r-help@r-project.org
Subject: Re: [R] Number -> Fraction
On Thu, 13 Sep 2007, Mauro Arnoldi wrote:
> Hi everybody!
> I'm new to this list and also to the R program.
>
> I'd like to know if there is a function able to convert results into
>
--
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Thomas Lumley
> Sent: Thursday, September 13, 2007 11:34 AM
> To: Mauro Arnoldi
> Cc: r-help@r-project.org
> Subject: Re: [R] Number -> Fraction
>
> O
Alle giovedì 13 settembre 2007, Stefano Calza ha scritto:
>
> see "fractions" in library MASS
>
Yeah!
> 1/3
[1] 0.333
> fractions(0.333)
[1] 1/3
Great! Thanks! (grazie :) )
Mauro
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailm
Ravi Varadhan wrote:
>
> Finding sufficiently accurate rational approximations to a real
> number, can be done using fractions() in MASS, which uses
> continued fractions.
>
In a slight off-topic digression, I recently learned that
any irrational number that can be nicely approximated by
rational
10 matches
Mail list logo