# Welcome to R-DAVIS 2020 Week 1 # this is pretty neat 1 + 100 #r uses the order of operation 3 + 5 *2 #use parenthesies to force order of operations (3 + 5)*2 3+5 3 + 5 #scientific notation 2 / 10000 1e9 * 8 #functions in R sin(3.14) log(3) exp(0.5) #nested functions, interpretted from the inside out sqrt(exp(4)) #comparisons in R #R can do logical comparisons 1 == 1 1 == 3 1 != 2 #objects and assignments in R x <- 1/4 log(x) x <- 99 x <- x + 1 y <- x * 10 this_is_my_object <- 90 log(this_is_my_object) #tab completion log(3, 10) log(x = 3, base = 10) #the same as above log(10, 3) log(base = 10, x = 3) log(x = 10, base = 3) log(aword)