Search the web
Sign In
New User? Sign Up
sportsci_rtutorial · Sportsci.org R tutorial
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Session 12   Message List  
Reply | Forward Message #22 of 61 |
Re: Session 12

--- In sportsci_rtutorial@yahoogroups.com, "Ian
Shrier" <ian.shrier@...> wrote:
>
> Rob
>
> I am going through the tutorial #12. You used the term "x%%2" and
said it is
> even numbers divided by modulo 2 have no remainder. Sorry for my
ignorance,
> but what is "modulo", and have you talked about "%%" before?
>
> Ian
>

Hi Ian,

Good point. I introduced the modulo operator at the beginning of
Session 5. Probably should have explained what a modulo operator is
though.

Wikipedia definition:
The modulo operation finds the remainder of division of one number by
another. Given two numbers, a (the dividend) and n (the divisor), a
modulo n (abbreviated as a mod n) is the remainder, on division of a
by n.

The first number is divided by the second using integer division,
meaning no decimal places are allowed. For instance, the expression
"7 mod 3" would evaluate to 1: Two times 3 equals 6 with a remainder
of 1: 7 = 2*3 + 1
or
"18 mod 4" evaluates to 2: 18 = 4*4 + 2

Since the definition of an even number is that you can divide it by
2, all even numbers will have a reminder of 0. In R, the operator for
modulos operation is %%, which results in the expression "x%%2".

Hope that explains it.
Cheers
Rob





Wed Jun 20, 2007 1:25 pm

gerrobrein
Offline Offline
Send Email Send Email

Forward
Message #22 of 61 |
Expand Messages Author Sort by Date

Sorry guys, Took me a while to upload a new session since I just moved back to Germany. With regards to that biker post, I changed the group settings. Now only...
gerrobrein
Offline Send Email
Jun 19, 2007
4:12 pm

Rob I am going through the tutorial #12. You used the term "x%%2" and said it is even numbers divided by modulo 2 have no remainder. Sorry for my ignorance, ...
Ian Shrier
ianshrier
Offline Send Email
Jun 19, 2007
8:04 pm

... said it is ... ignorance, ... Hi Ian, Good point. I introduced the modulo operator at the beginning of Session 5. Probably should have explained what a...
gerrobrein
Offline Send Email
Jun 20, 2007
1:27 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help