Vectors

newVector <-c(1,2,3)# to create vector
newVector # to return vector values
newVector[1]# to access the first element of the vector

Certain functions can be called on vectors:

length(newVector)# report length vectorhelp(length)# look up the instructions for the length functionmax(newVector)mean(newVector)
newVector +2# Mathematical operations can also be performed on all elements of a vectorrm(newVector)# remove vector from the workspace