Relationale Operatoren

R für Fortgeschrittene

Filip Schouwenaars

DataCamp Instructor

Gleichheit ==

TRUE == TRUE
TRUE
TRUE == FALSE
FALSE
"hello" == "goodbye"
FALSE
3 == 2
FALSE
R für Fortgeschrittene

Ungleichheit ist nicht gleich Ungleichheit

TRUE != TRUE
FALSE
TRUE != FALSE
TRUE
"hello" != "goodbye"
TRUE
3 != 2
TRUE
R für Fortgeschrittene

< und >

3 < 5
TRUE
3 > 5
FALSE
#Alphabetical Order!
"Hello" > "Goodbye"
TRUE
#TRUE coerces to 1
#FALSE coerces to 0
TRUE < FALSE
FALSE
R für Fortgeschrittene

kleiner oder gleich und größer oder gleich

5 >= 3
TRUE
3 >= 3
TRUE
R für Fortgeschrittene

Relationale Operatoren & Vektoren

linkedin <- c(16, 9, 13, 5, 2, 17, 14)
linkedin
16  9 13  5  2 17 14
linkedin > 10
TRUE FALSE  TRUE FALSE FALSE  TRUE  TRUE
R für Fortgeschrittene

Relationale Operatoren & Vektoren

facebook <- c(17, 7, 5, 16, 8, 13, 14)
facebook
17  7  5 16  8 13 14
facebook <= linkedin
FALSE  TRUE  TRUE FALSE FALSE  TRUE  TRUE
R für Fortgeschrittene

Lass uns üben!

R für Fortgeschrittene

Preparing Video For Download...