Provide in the plain text R commands that finds/solves the following: Create a matrix named m1 with
Fantastic news! We've Found the answer you've been seeking!
Question:
Provide in the plain text R commands that finds/solves the following:
- Create a matrix named m1 with three rows and five columns and all the numeric (integer) values from 6 to 20!
- Multiply all elements in m1 by 0.5! Overwrite the matrix m1 with the result!
- Create, another matrix m2 with one row and five columns and all the numeric (integer) values from 1 to 5!
- Calculate the sum of all elements in m2!
- Combine m1 and m2 with rbing(). Save the result as m3 and check the dimension of the new matrix!
- Index the 5th column of m3!
- Index the 2nd and 4th lines of m3!
- Calculate the sums for all columns in m3!
- Calculate the standard deviation for the 3rd column in m3!
- From m3, index the element in the 2nd column and 2nd line and all eight adjacent elements! Save the result as m4 and examine its object class!
For submission, save the command as a plain text file, save the matrix data as .csv plain text file, and submit those two files.
Related Book For
An Experiential Introduction To Principles Of Programming Languages
ISBN: 9780262045452
1st Edition
Authors: Hridesh Rajan
Posted Date: