Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 2nd 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. \{r\}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions