#addition of 3 numbers (done), subtraction of 1 number from another (done), multiplication of 2 numbers (done), division of one number by another (done), raising a number to the 4th power(done), take the 3rd root of a number(done), and log to the base 10 of a number(done).
12+26+1995 #my son's birthday
## [1] 2033
2017-1972 #my age
## [1] 45
6 * 3
## [1] 18
540/22
## [1] 24.54545
2 ^ 4
## [1] 16
(64)^(1/3)
## [1] 4
x <- 8
log10(x)
## [1] 0.90309
#Enter a vector of 6 numbers of your choosing into an object, c, using the assignment operator, <-
a <- c(1,2,3,4,5,6)
#Print the 3rd element of c
print(3)
## [1] 3
#Print the length of vector c
length(a)
## [1] 6
#Enter into d a matrix in which the first row contains the numbers 1, 3, 5, 7 and the second row contains 2, 4, 6, 8
#Assign to F the addition of 5 to each element in d. Print F.
d <- c(1, 2, 3, 4, 5, 6, 7, 8)
dim(d) = c(2, 4)
d
##      [,1] [,2] [,3] [,4]
## [1,]    1    3    5    7
## [2,]    2    4    6    8
#Assign to F the addition of 5 to each element in d. Print F
F <- 5 + d
F
##      [,1] [,2] [,3] [,4]
## [1,]    6    8   10   12
## [2,]    7    9   11   13
#Print the dimensions of matrix F
dim(F)
## [1] 2 4
#Assign 5.25 to k and ‘frank’ to m
k <- 5.25
m <- "frank"
#Check k and m to determine their data type
class(k)
## [1] "numeric"
class(m)
## [1] "character"
#Convert k to an integer and assign the result to p. Print p to the console. 
k <- as.integer(k)
k
## [1] 5
p <- 5
p
## [1] 5
#Assign to G the conversion of k to a character.
G <- k
G
## [1] 5
#Add 5.1 to G. Explain what happens and why.
G <--5.1 + k
#I can't add 5.1 to G, because 5.1 is a numeric value and k is a character.