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