70 likes | 74 Views
This presentation educates you about R - Decision making with general form of a typical decision making structure found in most of the programming languages, Statement & Description, Types of Decision Trees and Decision Making Statement in R.<br><br>For more topics stay tuned with Learnbay.<br>
E N D
R - Decision making Swipe
R - Decision making Decision making structures require the programmer to specify one or more conditions to be evaluated or tested by the program. Along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false. Following is the general form of a typical decision making structure found in most of the programming languages
Condition If condition true If condition false Conditional code
Statement & Description R provides the following types of decision making statements. if statement An if statement consists of a Boolean expression followed by one or more statements. if.else statement An if statement can be followed by an optional else statement, which executes when the Boolean expression is false. switch statement A switch statement allows a variable to be tested for equality against a list of values.
Types of Decision Trees Regression Trees Classification Trees Classification Error Rate Gini Index Cross-Entropy Advantages and Disadvantages of Decision Trees
Decision Making Statement in R The decision making statement in R are as followed: if statement if-else statement if-else-if ladder nested if-else statement switch statement
Topics for next Post R - Loops R - Strings R - Factors Stay Tuned with