Understanding the result of modulo operator

0 votes
Just trying to understand how the %% operator works in R:
Jun 2, 2022 in Others by avinash
• 1,840 points
352 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
This equation can be used to calculate the modulo operation:

A percentage of b equals b - floor(a / b)*a

The amount of times you can divide a by b is shown by floor(a / b).

The amount that was successfully shared in full was floor(a / b)*b.

The remainder of the division is equal to the sum (a) less what was shared.

Using the previous illustration, this results in:

5 percent 7 is 5 minus floor(5 / 7) * 7 = 5.
answered Jun 23, 2022 by Sohail
• 3,040 points

edited Mar 5

Related Questions In Others

0 votes
1 answer

Consolidate orders to single row counting number of orders and averaging the result

Try this: Sub aveCount() Dim rng As Range Dim cl ...READ MORE

answered Jan 17, 2023 in Others by narikkadan
• 63,600 points
437 views
0 votes
3 answers

What are the applications of artificial neural networks?

Artificial neural network is a computational model ...READ MORE

answered Mar 2, 2019 in Others by SA
• 1,090 points
2,938 views
+2 votes
2 answers
0 votes
2 answers

How to get the URL of the current tab in Google Chrome?

Its so simple.... If you want to ...READ MORE

answered Aug 12, 2020 in Others by Steve
• 200 points
3,768 views
0 votes
0 answers

AtoX: Leading the new height of public blockchain’s development

What is the public blockchain? It is easy ...READ MORE

Jan 25, 2019 in Others by anonymous
634 views
0 votes
1 answer

Where is the documentation to refer for coinbase api integration of Etherium coin currency in php?

Hey there! Please refer to the following ...READ MORE

answered Jan 25, 2019 in Others by Omkar
• 69,220 points
1,109 views
0 votes
1 answer
0 votes
1 answer

Difference between the == and %in% operators in R

percent in percent "returns a vector of ...READ MORE

answered Jun 20, 2022 in Data Science by Sohail
• 3,040 points
850 views
0 votes
1 answer

Difference between the == and %in% operators in R

According to help('percent in percent'), percent in ...READ MORE

answered Jun 23, 2022 in Data Science by Sohail
• 3,040 points
592 views
0 votes
1 answer

How to make loop for one-at-a time logistic regression in R?

You're probably looking for something similar to ...READ MORE

answered Jun 20, 2022 in Data Science by Sohail
• 3,040 points
1,181 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP