[R] Calculate remainer

Julian Burgos jmburgos at u.washington.edu
Thu Dec 20 21:47:50 CET 2007


Hi Livia,

There are several ways to do this.  Try:

a=50/12

floor(a) will give you the entire portion, and

a-floor(a) will give you the remainder.

Julian

livia wrote:
> Hello everyone,
> 
> I have got a question about a simple calculation. If I would like to
> calculate 50/12 and return the result as 4 and the remainer 2. Is there a
> function of doing this?
> 
> Many thanks.



More information about the R-help mailing list