# Mathametical

# + - %% /: they numerical operators: they return a numeric result

# numeric result
val <- 56 - 6

# str function can always be used to check the structure of an object
str(val)

# binary, logical operators
4 < 6
4 >6

# logical values
TRUE 
FALSE

# equal operator
6 == 4 

# not equal operator
6 != 4

# less-than greater-than and operator
6 <= 6
6 >= 6


#############
# Some logical operators can have logical operands
a <- 5
b <- 2
d <- 4

# first result
first <- a < b
second <- a > d

# and
TRUE & FALSE
TRUE & TRUE
FALSE & FALSE

# or 
TRUE | FALSE
FALSE | FALSE
first | second

# not
!FALSE
!TRUE

# Boolean, logical
str(TRUE)
str(88.8)

# what is the result of this?
TRUE + TRUE # Promotion

# Expressions of Boolean algebra
# can be evaluated in R 
!((!(a|b)) & TRUE )




