[R] fractional part

Hans-Peter gchappi at gmail.com
Thu Sep 28 19:40:11 CEST 2006


2006/9/28, Berton Gunter <gunter.berton at gene.com>:
> ?"%%"

I didn't know that operator, thanks!

But I was not clear, as I was looking more towards a lowlevel function.
E.g. "trunc", "floor", "ceiling", ... are defined in names.c and while
I currently not fully understand this I thought there could be a
similair thing for fraction.

I defined the function "frac <- function(x) abs( x - trunc(x) )"
which seems to work well.

Thanks again,
Hans-Peter



More information about the R-help mailing list