################################################################################
#### Module 3, Lesson about Vectors, Basic Functions, Data Frames, and Help ####
################################################################################
# Lesson 4, part 1: The basics of variables and vectors


###################################
##### VARIABLES
# Variables are defined as entities used to store information in R.
# They are created using a left facing arrow '<-':


variable1 <- 3

variable1

number_of_leaves <- 230
num_leaves <- 230

tree_diam_cm <- 15
tree_height_m <- 5.3

species <- "Quercus rubra"

species <- 'Quercus rubra'

deciduous <- T

deciduous



###################################
##### VECTORS AND VECTOR MATH
# Vectors are defined using the concatenate function 'c()'.

diam_cm <- c(12,18,32,8,23,26,21,18)

diam_m <- diam_cm/100

sqrt(diam_cm)

vec1 <- c(1,2,3,4,5,6)
vec2 <- c(1,2,1,2,1,2)

vec3 <- vec1 * vec2


###################################
##### SUMMARY
# - Different types of variables
# - Creating vectors
# - Vector math
