do-while loop in R

0 votes
Was curious about how to write do-while-style loop?

Not sure what it exactly means. Can someone elaborate if you understand it and/or if you have a different solution?
Jun 1 in Data Science by Avinash
• 240 points
18 views

1 answer to this question.

0 votes

Unlike for and while loops, which test the loop condition at the top of the loop, the do...while loop in C programming checks its condition at the bottom of the loop.

A do...while loop is similar to

do {
statement(s);
} while( condition );

a while loop, except the fact that it is guaranteed to execute at least one time.

answered Jun 1 by Sohail
• 740 points

Related Questions In Data Science

0 votes
0 answers

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

The question concerns the practical difference between ...READ MORE

Jun 1 in Data Science by avinash
• 760 points
14 views
0 votes
0 answers

Introduction to Statistical Learning with Applications in R Figure Codes

I recently bought the following book: An Introduction ...READ MORE

Jun 1 in Data Science by avinash
• 760 points
19 views
0 votes
0 answers

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

The question concerns the practical difference between ...READ MORE

Jun 1 in Data Science by avinash
• 760 points
11 views
0 votes
0 answers

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

The question concerns the practical difference between ...READ MORE

Jun 1 in Data Science by avinash
• 760 points
9 views
0 votes
1 answer

How to create excellent examples in R?

An excellent example must consist of the ...READ MORE

answered Apr 10, 2018 in Data Analytics by kappa3010
• 2,090 points

edited Apr 12, 2018 by kappa3010 234 views
0 votes
1 answer

Add regression line equation and R^2 on graph

Let us look at one of the ...READ MORE

answered Mar 23 in Machine Learning by Dev
• 6,000 points
158 views
0 votes
0 answers

Test if a vector contains a given element

How to check if a vector contains ...READ MORE

Jun 1 in Data Science by avinash
• 760 points
12 views
0 votes
0 answers

How to join (merge) data frames (inner, outer, left, right)

Given the following two data frames: data.frame = ...READ MORE

Jun 14 in Data Science by Avinash
• 1,060 points
9 views
0 votes
1 answer

What does c do in R?

The c function in R programming usually stands ...READ MORE

answered Jun 1 in Data Science by Sohail
• 740 points
14 views
0 votes
1 answer

Creating new Functions with Linear Regression in R :

When we want to create a model ...READ MORE

answered Jun 1 in Data Science by Sohail
• 740 points
22 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP