In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the relevant knowledge of the loop type of R language, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading this article on the loop type of R language. let's take a look.
What is a cycle?
Loop, which is used to do the same thing (that is, iteration) for multiple inputs of the same kind, such as doing the same operation for different columns and different data sets. Circular statements allow us to execute a statement or group of statements multiple times.
The loop types provided by the R language are:
Repeat cycle
While cycle
For cycle
The loop control statements provided by R language are:
Break statement
Next statement
Loop control statements change the order in which your code is executed, through which you can jump the code.
Loop type repeat
The repeat loop executes the code until the conditional statement is false, using the break statement to exit the loop. The syntax format is as follows:
Repeat {/ / related code if (condition) {break}}
The following example exits the loop when the variable cnt is 5, and cnt is the counting variable:
Instance repeat {v
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.