[R] modulus operator?

Spencer Graves spencer.graves at pdf.com
Mon May 19 18:34:21 CEST 2003


What do you mean by "modulus"?  Is that something like absolute value 
(as in the "maximum modulus theorem";  see 
"http://mathworld.wolfram.com/MaximumModulusPrinciple.html")?  Or do you 
mean something like remainder?  If the latter, what about "%%":

 > 3.5%%2
[1] 1.5

hth.  spencer graves

Wolski wrote:
> I havent found any.
> I am using this.
> 
> mod<-function(x,m)
>   {
>     t1<-floor(x/m)
>     return(x-t1*m)
>   }
> 
> Eryk
> 
> *********** REPLY SEPARATOR  ***********
> 
> On 5/19/2003 at 8:56 AM Anna  H. Pryor wrote:
> 
> 
>>Is there a modulus operator in R?
>>
>>Anna
>>
>>______________________________________________
>>R-help at stat.math.ethz.ch mailing list
>>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> 
> 
> 
> Dipl. bio-chem. Eryk Witold Wolski    @    MPI-MG Dep. Vertebrate Genomics   
> Ihnestrasse 73 14195 Berlin          'v'    
> tel: 0049-30-84131285               /   \    
> mail: wolski at molgen.mpg.de        ---W-W----
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list