[For this exercise, first write down your answer, without using R. Then, check your answer using R.] Answers to the exercises are available here. Exercise 1 If M=matrix(c(1:10),nrow=5,ncol=2, dimnames=list(c(‘a’,’b’,’c’,’d’,’e’),c(‘A’,’B’))) What is the value of: M Exercise 2 Consider the matrix M, What is the value of: M[1,] M[,1] M[3,2] M[‘e’,’A’] Exercise 3 Consider the matrix […]

# matrix

## Matrix exercises

Please note, solutions are available here. Exercise 1 Create three vectors x,y,z with integers and each vector has 3 elements. Combine the three vectors to become a 3×3 matrix A where each column represents a vector. Change the row names to a,b,c. Think: How about each row represents a vector, can you modify your code […]