[R] ODD and EVEN numbers

Detlef Steuer detlef.steuer at hsu-hamburg.de
Fri Apr 2 08:48:04 CEST 2010

Just to give you a hint for the future:

If you ask google for "odd, even, R" you get a messages from 2003 as second match:

Dave Caccace wrote:
> Hi,
> I'm trying to create a function, jim(p) which varies
> depending on whether the value of p is odd or even. I
> was trying to use th eIf function, but i cant work out
> a formula to work out if p is odd or even.
> Thanks,
> Dave

if(p %% 2) "odd" else "even"

Uwe Ligges 
(Hi Uwe!)

My guess is, using so much capitals in your e-mail has turned away about 1000
helpful souls from your future posts.

May be reading the posting guide and a one minute try to solve the
problem by yourself googling would be appropriate?
Think for a moment: Google would have given an answer (the answer!) in 1
minute. You wrote an e-mail to quite a few thousands of subscribers.
That needed more than a minute on your side. And how many hours of
reading time took it off of your readers?

Seasonal greetings

On Thu, 01 Apr 2010 17:27:01 -0700
girlme80 at yahoo.com wrote:

> Excuse me Carl Withoft! 
> For your information, this is not my homework. I'm just helping my friend in "a part" of her R code.
> And everytime I ask a question here, it's just a "SMALL PART" of the 2-pages-program that I am doing. And for your information, the answers that I get, I still think on how to make use of them. It does not mean that when I get answers, I use them immediately without thinking!
> And you have no right to tell me that coz I don't remember you answering any of my questions.
> IF YOU DON'T KNOW THE ANSWERS TO MY QUESTIONS, just keep quiet, and let the smart guys share their thoughts.
> ______________________________________________
> 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