Question: 1. Matrices a. Construct a 46 matrix that is filled row-wise with the numbers 2,4,6,48, in that order. Store the matrix in a variable called
1. Matrices a. Construct a 46 matrix that is filled row-wise with the numbers 2,4,6,48, in that order. Store the matrix in a variable called Mat.A. Make sure you display your result so I can see it in your final knitted document. .' {r} b. Create a matrix Mat.B by removing the second column of Mat.A. Again, display Mat.B. Then confirm the dimensions of Mat. B are 45. {r} c. Create a new matrix Mat.C by appending the vector with numbers 100,1000,0,25 as a 6 th column to mat.B. Again, display Mat.C, and confirm the resulting matrix has dimensions 46. " {r} d. i. Use a single R command to display the 4 th column of Mat.C. ii. Use a single R command to display Mat.C with the 2 nd and 5 th column deleted. iii. Use a single R command to replace the 3rd row of Mat.C with the sequence 10-15. Display your result. iv. Use a single R command to replace the 4 th column of Mat.C with the 4 th column of Mat.C sorted largest to smallest. Display your result. v. Use a single R command to add 25 to all elements of Mat.C, and display your result. vi. Use a single R command to replace the 1st row, 3rd column with 10000 . Display your result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
