[R] Odp: identifying odd or even number

Petr PIKAL petr.pikal at precheza.cz
Wed Jul 7 14:14:18 CEST 2010


Hi

r-help-bounces at r-project.org napsal dne 01.07.2010 17:40:22:

> Hi, I run into problem when writing a syntax, I don't know syntax that 
will 
> return true or false if an integer is odd or even.

fff <- function(x) as.logical(x%%2)

Regards
Petr



> Thanks
> 
> OYEYEMI, Gafar Matanmi
> 
> Department of Statistics
> 
> University of Ilorin
> 
> P.M.B 1515
> 
> Ilorin, Kwara State
> 
> Nigeria
> 
> Tel: +2348052278655
> 
> Tel: +2348068241885
> 
> 
> 
>    [[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.



More information about the R-help mailing list