Conditional statements and repeated operations are some of the important aspects in any programming, whether it is in the data science area or for general programming purpose. Often, you will need to test several alternative statements. For example, if you are optimizing any mathematical function, the stopping rule depends on the conditional statement. Also, if you are solving any equation that needs iteration, you must use the repetition operator. The recipes of this chapter will give you a basic understanding of the use of conditional and repetitive statements in R. Each recipe contains certain context and code with explanation. You will feel confident in writing a conditional statement and using a loop in R after reading this chapter.
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine