v <- c(1,2,3,4,0,-1,-2)
# Sort the elements of the vector:
sort.result <- sort(v)
print(paste0("v: ",v))
print(paste0("sorted v: ",sort.result))

#mixed1 <- c(6, a‚ 7, b‚ 8) 
#print(paste0("mixed1: ",mixed1))
#print(paste0("class:  ",class(mixed1)))
             
ul_chars <- character(4) 
print(paste0("ul_chars: ",ul_chars))
ul_chars[1] <- "A"
print(paste0("ul_chars: ",ul_chars))

names <- c("dave", "stella", "ralph", "john") 
print(paste0("names:      ",names))
print(paste0("length:     ",length(names)))
print(paste0("names[1:2]: ",names[1:2]))
print(paste0("3,4,1,2:    ", names[3:4], names[1:2]))
             
x <- c(1,2,3,4,5,6) 
print(paste0("x[2]:    ",x[2]))
print(paste0("x[8]:    ",x[8]))
print(paste0("x[-3]:   ",x[-3]))
print(paste0("x[2:4]:  ",x[2:4]))

x1 <- c(1,2,3,4) 
y1 <- c(4,5,6,7) 
print(paste0("x1+y1:   ",x1+y1))

x2 <- c(1,2,3,4) 
y2 <- c(4,5)
print(paste0("x2+y2:   ",x2+y2))
print(paste0("x2-y2:   ",x2-y2))
print(paste0("x2*y2:   ",x2*y2))

