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
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand