Operadores relacionales

R intermedio

Filip Schouwenaars

DataCamp Instructor

Igualdad ==

TRUE == TRUE
TRUE
TRUE == FALSE
FALSE
"hello" == "goodbye"
FALSE
3 == 2
FALSE
R intermedio

Desigualdad !=

TRUE != TRUE
FALSE
TRUE != FALSE
TRUE
"hello" != "goodbye"
TRUE
3 != 2
TRUE
R intermedio

< y >

3 < 5
TRUE
3 > 5
FALSE
#Alphabetical Order!
"Hello" > "Goodbye"
TRUE
#TRUE coerces to 1
#FALSE coerces to 0
TRUE < FALSE
FALSE
R intermedio

<= y >=

5 >= 3
TRUE
3 >= 3
TRUE
R intermedio

Operadores relacionales y vectores

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 intermedio

Operadores relacionales y vectores

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 intermedio

¡Vamos a practicar!

R intermedio

Preparing Video For Download...