Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

if else in r

x <- 0
if (x < 0) {
print("Negative number")
} else if (x > 0) {
print("Positive number")
} else
print("Zero")
Source by www.datamentor.io #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+2 =